Skip to content

Commit

Permalink
test: fix test failure (#612)
Browse files Browse the repository at this point in the history
Co-authored-by: Jordan-Williams2 <[email protected]>
  • Loading branch information
jor2 and Jordan-Williams2 authored Dec 12, 2024
1 parent 759a0fe commit 557d7eb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/other_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ func TestRunReservedIpExample(t *testing.T) {
output, err := options.RunTestConsistency()
assert.Nil(t, err, "This should not have errored")
assert.NotNil(t, output, "Expected some output")
// checking vpe_ips to exist
// checking reserved_ips to exist
outputs := terraform.OutputAll(options.Testing, options.TerraformOptions)
expectedOutputs := []string{"vpe_ips"}
expectedOutputs := []string{"reserved_ips"}
_, outputErr := testhelper.ValidateTerraformOutputs(outputs, expectedOutputs...)
assert.NoErrorf(t, outputErr, "Some outputs not found or nil")
// checking vpe_ips to contain a set on not empty slices as expected
mapToValidate, ok := outputs["vpe_ips"].(map[string]interface{})
// checking reserved_ips to contain a set on not empty slices as expected
mapToValidate, ok := outputs["reserved_ips"].(map[string]interface{})
var outputErrMap error
if !ok {
outputErrMap = fmt.Errorf("Output: Failed to read value of key %s\n", "vpe_ips")
outputErrMap = fmt.Errorf("Output: Failed to read value of key %s\n", "reserved_ips")
} else {
_, outputErrMap = ValidateOutputMapOfSlicesContent(mapToValidate)
}
Expand Down

0 comments on commit 557d7eb

Please sign in to comment.