File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,19 +30,21 @@ func TestAzure(t *testing.T) {
3030 }
3131
3232 // unit tests
33- common .LogColor ("yellow" , "Unit Test" )
33+ if testSetup ["TEST_TYPE" ] == "unit" {
34+ common .LogColor ("yellow" , "Unit Test" )
3435
35- // website::tag::2:: Run `terraform init` and `terraform plan`. Fail the test if there are any errors.
36- terraform .InitAndPlan (t , terraformOptions )
36+ // website::tag::2:: Run `terraform init` and `terraform plan`. Fail the test if there are any errors.
37+ terraform .InitAndPlan (t , terraformOptions )
38+ }
3739
3840 // integration tests
39- if testSetup ["TEST_TYPE" ] != "unit" {
41+ if testSetup ["TEST_TYPE" ] == "integration" {
42+ common .LogColor ("yellow" , "Integration Test" )
43+
4044 // get terratest settings for integration test
4145 terratestSettings := path + "/terratest.yaml"
4246 settings := common .GetTerratestSettings (terratestSettings )
4347
44- common .LogColor ("yellow" , "Integration Test" )
45-
4648 // website::tag::5:: At the end of the test, run `terraform destroy` to clean up any resources that were created
4749 defer terraform .Destroy (t , terraformOptions )
4850
You can’t perform that action at this time.
0 commit comments