Skip to content

Commit c1e0640

Browse files
committed
docs: Added documentation about BATS tests.
1 parent 7325224 commit c1e0640

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CONTRIBUTING.md

+6
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ make bats
249249
250250
#### How to write a BATS test
251251
252+
`tfschema` is a tool that can view the schema of any Terraform provider that is installed (via `terraform init` or `make build`). After installing the provider, we can run `tfschema` to generate output information. We use BATS to test that output against what is expected.
253+
254+
* A BATS test lives in the `bats/` directory.
255+
* [BATS: Writing tests](https://bats-core.readthedocs.io/en/stable/writing-tests.html)
256+
* [tfschema: README](https://github.com/minamijoyo/tfschema)
257+
252258
### Fuzzer
253259
254260
Fuzzing is a type of automated testing which continuously manipulates inputs to a program to find bugs. Go fuzzing uses coverage guidance to intelligently walk through the code being fuzzed to find and report failures to the user. Since it can reach edge cases which humans often miss, fuzz testing can be particularly valuable for finding security exploits and vulnerabilities.

bats/tfschema.bats.sh

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env bats
2+
# https://bats-core.readthedocs.io/en/stable/writing-tests.html
23

34
@test "listing the data sources" {
45
run tfschema data list corefunc

0 commit comments

Comments
 (0)