Skip to content

Slice 1: round-trip + fixture-load tests (#10) - #17

Merged
nkcoder merged 1 commit into
mainfrom
slice-1/tests
Jul 12, 2026
Merged

Slice 1: round-trip + fixture-load tests (#10)#17
nkcoder merged 1 commit into
mainfrom
slice-1/tests

Conversation

@nkcoder

@nkcoder nkcoder commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Closes #10. Pure-Go regression net over the schema, sanitizer, and golden fixture — no AWS. This closes out Slice 1.

Tests

  • Round-trip — marshal/unmarshal a Snapshot, assert equality; verifies nil FromPort/ToPort (all-ports) survives.
  • Golden fixture — counts (5 ENIs / 4 SGs / 2 route tables / 1 endpoint), the alb→app→db SG-references-SG chain resolves, the gateway-endpoint prefix-list route is present, amazon-elb/amazon-rds ENI owners preserved, account sanitized.
  • Sanitizer — account redacted across ARNs/peers/owners; service owners kept; idempotent.

These become the regression net for the engine (Slice 3+).

CI

go test / golangci-lint clean.

- round-trip: schema stability + nil-port (all-ports) semantics survive JSON
- golden fixture: counts, alb->app->db SG chain resolves, gateway-endpoint
  prefix-list route present, amazon-elb/amazon-rds ENI owners preserved, account sanitized
- sanitizer: account redacted across ARNs/peers/owners, service owners kept, idempotent

Closes #10
@nkcoder
nkcoder merged commit a44f07f into main Jul 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Snapshot round-trip + fixture load tests

1 participant