Skip to content

Commit

Permalink
second commit of keyvault module - add a functional end-to-end test
Browse files Browse the repository at this point in the history
  • Loading branch information
jingwei-MS committed Aug 10, 2023
1 parent e2b5fd9 commit a7aef4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions test/e2e/terraform_test.go
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
package e2e

import (
"regexp"
"testing"

test_helper "github.com/Azure/terraform-module-test-helper"
"github.com/gruntwork-io/terratest/modules/terraform"
"github.com/stretchr/testify/assert"
)

func TestExamplesBasic(t *testing.T) {
test_helper.RunE2ETest(t, "../../", "examples/basic", terraform.Options{
Upgrade: true,
}, func(t *testing.T, output test_helper.TerraformOutput) {
gotEchoText, ok := output["echo_text"].(string)
assert.True(t, ok)
assert.Regexp(t, regexp.MustCompile("Hello, world!"), gotEchoText)
})
}, nil)
}
2 changes: 1 addition & 1 deletion test/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ go 1.19
require (
github.com/Azure/terraform-module-test-helper v0.15.0
github.com/gruntwork-io/terratest v0.43.9
github.com/stretchr/testify v1.8.4
)

require (
Expand Down Expand Up @@ -77,6 +76,7 @@ require (
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.8.4 // indirect
github.com/thanhpk/randstr v1.0.6 // indirect
github.com/tmccombs/hcl2json v0.3.3 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
Expand Down

0 comments on commit a7aef4b

Please sign in to comment.