Skip to content

Commit 9238529

Browse files
fix github action
1 parent 977be99 commit 9238529

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

_test/labels_test.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Managed By : CloudDrove
2+
// Description : This Terratest is used to test the Terraform Labels module.
3+
// Copyright @ CloudDrove. All Right Reserved.
4+
package test
5+
6+
import (
7+
"github.com/gruntwork-io/terratest/modules/terraform"
8+
"github.com/stretchr/testify/assert"
9+
"testing"
10+
)
11+
12+
func Test(t *testing.T) {
13+
t.Parallel()
14+
15+
terraformOptions := &terraform.Options{
16+
// Source path of Terraform directory.
17+
TerraformDir: "../_example",
18+
Upgrade: true,
19+
}
20+
21+
// This will run 'terraform init' and 'terraform application' and will fail the test if any errors occur
22+
terraform.InitAndApply(t, terraformOptions)
23+
24+
// To clean up any resources that have been created, run 'terraform destroy' towards the end of the test
25+
defer terraform.Destroy(t, terraformOptions)
26+
27+
// To get the value of an output variable, run 'terraform output'
28+
Tags := terraform.OutputMap(t, terraformOptions, "tags")
29+
30+
// Check that we get back the outputs that we expect
31+
assert.Equal(t, "labels-test-private", Tags["Name"])
32+
}

0 commit comments

Comments
 (0)