-
Notifications
You must be signed in to change notification settings - Fork 5
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 #9 from clouddrove/0.15
fix terratest
- Loading branch information
Showing
8 changed files
with
43 additions
and
31 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
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,13 +1,21 @@ | ||
repos: | ||
- repo: git://github.com/antonbabenko/pre-commit-terraform | ||
rev: v1.45.0 | ||
|
||
- repo: https://github.com/gruntwork-io/pre-commit | ||
rev: v0.1.12 # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases | ||
hooks: | ||
- id: terraform_fmt | ||
- id: terraform-fmt | ||
- id: shellcheck | ||
- id: tflint | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.4.0 | ||
- repo: git://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 # Use the ref you want to point at | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: mixed-line-ending | ||
- id: check-byte-order-marker | ||
- id: check-executables-have-shebangs | ||
- id: check-merge-conflict | ||
- id: debug-statements | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- id: trailing-whitespace |
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 |
---|---|---|
@@ -1,34 +1,32 @@ | ||
// Managed By : CloudDrove | ||
// Description : This Terratest is used to test the Terraform EFS module. | ||
// Description : This Terratest is used to test the Terraform EFS modules. | ||
// Copyright @ CloudDrove. All Right Reserved. | ||
|
||
package test | ||
|
||
import ( | ||
"testing" | ||
//"strings" | ||
"github.com/stretchr/testify/assert" | ||
"github.com/gruntwork-io/terratest/modules/terraform" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestEFS(t *testing.T) { | ||
func Test(t *testing.T) { | ||
t.Parallel() | ||
|
||
terraformOptions := &terraform.Options{ | ||
// Source path of Terraform directory. | ||
TerraformDir: "../_example", | ||
Upgrade: true, | ||
} | ||
|
||
// This will run `terraform init` and `terraform apply` and fail the test if there are any errors | ||
// This will run 'terraform init' and 'terraform application' and will fail the test if any errors occur | ||
terraform.InitAndApply(t, terraformOptions) | ||
|
||
// At the end of the test, run `terraform destroy` to clean up any resources that were created | ||
// To clean up any resources that have been created, run 'terraform destroy' towards the end of the test | ||
defer terraform.Destroy(t, terraformOptions) | ||
|
||
// Run `terraform output` to get the value of an output variable | ||
keyArn := terraform.Output(t, terraformOptions, "efs_arn") | ||
// To get the value of an output variable, run 'terraform output' | ||
Tags := terraform.OutputMap(t, terraformOptions, "tags") | ||
|
||
// Check that we get back the outputs that we expect | ||
assert.Equal(t, "efs-test", Tags["Name"]) | ||
|
||
// Verify we're getting back the outputs we expect | ||
assert.Contains(t, keyArn, "arn:aws:elasticfilesystem") | ||
} |
This file was deleted.
Oops, something went wrong.
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