Skip to content

Commit

Permalink
Merge pull request #2 from F5Networks/devel_moduletest
Browse files Browse the repository at this point in the history
added module testing code
  • Loading branch information
RavinderReddyF5 authored Jan 19, 2022
2 parents ad7d0d3 + 0a6a8ef commit acd4120
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 acd4120

Please sign in to comment.