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

chore: Add missing tests for rendering manifests #814

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

killianmuldoon
Copy link
Contributor

@killianmuldoon killianmuldoon commented Feb 16, 2024

This PR adds tests for GetManifestObjects functions across the board. The purpose of these tests is to ensure that each and every field can be rendered, and to prevent regressions from changes in the yamls.

This PR includes #813 and should be held until that one merges.

@killianmuldoon killianmuldoon changed the title [WIP] bug: Add tests for rendering manifests bug: [WIP] Add tests for rendering manifests Feb 16, 2024
@killianmuldoon killianmuldoon force-pushed the pr-add-manifest-tests branch 2 times, most recently from 5b32751 to fc5e779 Compare February 19, 2024 13:24
@killianmuldoon killianmuldoon changed the title bug: [WIP] Add tests for rendering manifests bug: Add missing tests for rendering manifests Feb 19, 2024
@killianmuldoon killianmuldoon changed the title bug: Add missing tests for rendering manifests chore: Add missing tests for rendering manifests Feb 19, 2024
@killianmuldoon killianmuldoon force-pushed the pr-add-manifest-tests branch 4 times, most recently from ee660f9 to d33368e Compare February 20, 2024 17:48
Signed-off-by: killianmuldoon <cilliancapi@gmail.com>
}
}

func GetManifestObjectsTest(ctx context.Context, cr *mellanoxv1alpha1.NicClusterPolicy, catalog state.InfoCatalog,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could expand this test to include more objects and checks. We'd then be able to run it on all Manifests for templating which is in common. Specific tests can then be run for fields which are different or novel between states.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea. This function is already used in two files. Should we put it to common_test.go?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, this can be done in a followup.

@killianmuldoon
Copy link
Contributor Author

/retest-all

Copy link
Collaborator

@e0ne e0ne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @killianmuldoon!

Copy link
Collaborator

@adrianchiris adrianchiris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@adrianchiris adrianchiris merged commit 117f9a0 into Mellanox:master Mar 1, 2024
16 checks 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.

5 participants