Skip to content

Commit

Permalink
added module testing code
Browse files Browse the repository at this point in the history
  • Loading branch information
RavinderReddyF5 committed Dec 20, 2021
1 parent ad7d0d3 commit 0a6a8ef
Show file tree
Hide file tree
Showing 5 changed files with 624 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/aws_bigip_1nic_unit_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package test

import (
"testing"

"github.com/gruntwork-io/terratest/modules/terraform"
)

func TestTerraformAzure1NicExample(t *testing.T) {

t.Parallel()

terraformOptions := &terraform.Options{

TerraformDir: "../example/bigip_aws_1nic_deploy",

Vars: map[string]interface{}{
"location": "eastus",
},
}

defer terraform.Destroy(t, terraformOptions)

terraform.InitAndApply(t, terraformOptions)

}
26 changes: 26 additions & 0 deletions test/aws_bigip_2nic_unit_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package test

import (
"testing"

"github.com/gruntwork-io/terratest/modules/terraform"
)

func TestTerraformAzureExample(t *testing.T) {

t.Parallel()

terraformOptions := &terraform.Options{

TerraformDir: "../example/bigip_aws_2nic_deploy",

Vars: map[string]interface{}{
"location": "eastus",
},
}

defer terraform.Destroy(t, terraformOptions)

terraform.InitAndApply(t, terraformOptions)

}
26 changes: 26 additions & 0 deletions test/aws_bigip_3nic_unit_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package test

import (
"testing"

"github.com/gruntwork-io/terratest/modules/terraform"
)

func TestTerraformAzure3NicExample(t *testing.T) {

t.Parallel()

terraformOptions := &terraform.Options{

TerraformDir: "../example/bigip_aws_3nic_deploy",

Vars: map[string]interface{}{
"location": "eastus",
},
}

defer terraform.Destroy(t, terraformOptions)

terraform.InitAndApply(t, terraformOptions)

}
9 changes: 9 additions & 0 deletions test/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module github.com/RavinderReddyF5/azure-deploy

go 1.13

require (
github.com/Azure/azure-sdk-for-go v38.1.0+incompatible
github.com/gruntwork-io/terratest v0.28.5
github.com/stretchr/testify v1.6.1
)
Loading

0 comments on commit 0a6a8ef

Please sign in to comment.