Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixup cert package tests #1253

Merged
merged 5 commits into from
Oct 31, 2024
Merged

Fixup cert package tests #1253

merged 5 commits into from
Oct 31, 2024

Conversation

nbrownus
Copy link
Collaborator

This change fixes the old v1 tests and adds new tests for v2.

Most notably it fixes the TestMarshalingCertificateV1Consistency test which needed to be modified. netip.Prefix can not represent netmasks like 255.0.255.0. I went back to f22b4b5 and modified the test details to remove the non conforming netmasks and adjust the timestamps, the resulting expected byte arrays are represented in this test.

There are two spots where I am unsure if we want to panic, v1 and v2 String() calls json.Marshal which can fail. Currently they return a string but panic would be more obvious.

@nbrownus nbrownus force-pushed the certv1-tests branch 2 times, most recently from 53b352e to c12d8da Compare October 18, 2024 15:27
cert/test_helpers.go Outdated Show resolved Hide resolved
@nbrownus nbrownus marked this pull request as ready for review October 18, 2024 15:30
@johnmaguire
Copy link
Collaborator

Could knock out #1124 in this too.

@nbrownus nbrownus merged commit f30085e into cert-v2 Oct 31, 2024
9 checks passed
@nbrownus nbrownus deleted the certv1-tests branch October 31, 2024 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants