@@ -4,12 +4,14 @@ package test
44import (
55 "crypto/rand"
66 "encoding/base64"
7- "github.com/stretchr/testify/assert"
8- "github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/common"
9- "github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testhelper"
107 "log"
118 "os"
129 "testing"
10+
11+ "github.com/gruntwork-io/terratest/modules/terraform"
12+ "github.com/stretchr/testify/assert"
13+ "github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/common"
14+ "github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testhelper"
1315)
1416
1517// Use existing resource group
@@ -57,10 +59,17 @@ func TestRunFSCloudExample(t *testing.T) {
5759 "pg_version" : "14" , // Always lock this test into the latest supported Postgres version
5860 },
5961 })
60-
62+ options . SkipTestTearDown = true
6163 output , err := options .RunTestConsistency ()
6264 assert .Nil (t , err , "This should not have errored" )
6365 assert .NotNil (t , output , "Expected some output" )
66+
67+ // check if outputs exist
68+ outputs := terraform .OutputAll (options .Testing , options .TerraformOptions )
69+ expectedOutputs := []string {"port" , "hostname" }
70+ _ , outputErr := testhelper .ValidateTerraformOutputs (outputs , expectedOutputs ... )
71+ assert .NoErrorf (t , outputErr , "Some outputs not found or nil" )
72+ options .TestTearDown ()
6473}
6574
6675func TestRunUpgradeCompleteExample (t * testing.T ) {
0 commit comments