-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from userhas404d/target-update
Target update
- Loading branch information
Showing
7 changed files
with
152 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
[bumpversion] | ||
current_version = 0.0.0 | ||
current_version = 0.0.1 | ||
commit = True | ||
message = Bumps version to {new_version} | ||
tag = False | ||
tag_name = {new_version} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env bats | ||
|
||
TEST_DIR="$(pwd)/docs_lint_failure" | ||
|
||
# generate a test terraform project with a nested "module" | ||
function setup() { | ||
rm -rf "$TEST_DIR" | ||
working_dirs=("$TEST_DIR" "$TEST_DIR/nested") | ||
for working_dir in "${working_dirs[@]}" | ||
do | ||
|
||
mkdir -p "$working_dir" | ||
|
||
cat > "$working_dir/main.tf" <<"EOF" | ||
variable "foo" { | ||
default = "bar" | ||
type = string | ||
description = "test var" | ||
} | ||
EOF | ||
# intentionally generate incomplete READMEs | ||
cat > "$working_dir/README.md" <<EOF | ||
# Foo | ||
<!-- BEGIN TFDOCS --> | ||
bar | ||
<!-- END TFDOCS --> | ||
EOF | ||
done | ||
|
||
} | ||
|
||
@test "docs/lint: nested file failure" { | ||
run make docs/lint | ||
[ "$status" -eq 2 ] | ||
} | ||
|
||
function teardown() { | ||
rm -rf "$TEST_DIR" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/usr/bin/env bats | ||
|
||
TEST_DIR="$(pwd)/docs_lint_success" | ||
|
||
# generate a test terraform project with a nested "module" | ||
function setup() { | ||
rm -rf "$TEST_DIR" | ||
working_dirs=("$TEST_DIR" "$TEST_DIR/nested") | ||
for working_dir in "${working_dirs[@]}" | ||
do | ||
|
||
mkdir -p "$working_dir" | ||
|
||
cat > "$working_dir/main.tf" <<EOF | ||
variable "foo" { | ||
default = "bar" | ||
type = string | ||
description = "test var" | ||
} | ||
EOF | ||
cat > "$working_dir/README.md" <<"EOF" | ||
# Foo | ||
<!-- BEGIN TFDOCS --> | ||
## Providers | ||
No provider. | ||
## Inputs | ||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:-----:| | ||
| foo | test var | `string` | `"bar"` | no | | ||
## Outputs | ||
No output. | ||
<!-- END TFDOCS --> | ||
EOF | ||
done | ||
|
||
} | ||
|
||
@test "docs/lint: nested file success" { | ||
run make docs/lint | ||
[ "$status" -eq 0 ] | ||
} | ||
|
||
function teardown() { | ||
rm -rf "$TEST_DIR" | ||
} |