Skip to content

Commit

Permalink
fix(tests): correct pointer comparison in output wiring test
Browse files Browse the repository at this point in the history
- Update assertion in TestNewManifestConverter_generateOutputWiringParameter
- Fix NotSame comparison to properly compare pointers instead of values

Signed-off-by: Kim Christensen <kimworking@gmail.com>
  • Loading branch information
kichristensen committed Dec 1, 2024
1 parent 8f4eac1 commit e351f68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cnab/config-adapter/adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ func TestNewManifestConverter_generateOutputWiringParameter(t *testing.T) {
assert.Equal(t, "PORTER_MSG_OUTPUT", param.Destination.EnvironmentVariable, "unexpected destination environment variable set")

assert.Equal(t, "https://porter.sh/generated-bundle/#porter-parameter-source-definition", paramDef.ID, "wiring parameter should have a schema id set")
assert.NotSame(t, outputDef, paramDef, "wiring parameter definition should be a copy")
assert.NotSame(t, &outputDef, &paramDef, "wiring parameter definition should be a copy")
assert.Equal(t, outputDef.Type, paramDef.Type, "output def and param def should have the same type")
assert.Equal(t, cnab.PorterInternal, paramDef.Comment, "wiring parameter should be flagged as internal")
})
Expand Down

0 comments on commit e351f68

Please sign in to comment.