Skip to content

Commit 08a390f

Browse files
aknyshclaude
andcommitted
Fix NAT Gateway state assertion type mismatch
The nat.State field is of type types.NatGatewayState (AWS SDK enum), not a string. Comparing it directly to "available" creates a type mismatch causing the assertion to fail even when the gateway is actually available. Fixed by converting the enum to string for comparison: - assert.Equal(s.T(), "available", string(nat.State), ...) This ensures the assertion properly validates the NAT Gateway state. Addresses CodeRabbit feedback in test/component_test.go:300 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 648c9cb commit 08a390f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/component_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ func (s *ComponentSuite) TestNATPlacementByIndex() {
297297

298298
// Validate NAT Gateways are in "available" state
299299
for _, nat := range nats {
300-
assert.Equal(s.T(), "available", nat.State, "NAT Gateway should be in available state")
300+
assert.Equal(s.T(), "available", string(nat.State), "NAT Gateway should be in available state")
301301
}
302302

303303
// Validate no drift

0 commit comments

Comments
 (0)