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

Test ManagedClusterLabels in hub templates #594

Conversation

JustinKuli
Copy link
Contributor

One test is added to the BVT, one is SVT-only. I was planning on having an additional test to check that if a label is queried that doesn't exist, then the policy would be non-compliant (I thought that such an error would appear as a template-error), but the Go stdlib template inserts <no value> in that situation. That might not be ideal, but it's not something to fix at this moment.

Refs:

One test is added to the BVT, one is SVT-only. I was planning on having
an additional test to check that if a label is queried that doesn't
exist, then the policy would be non-compliant (I thought that such an
error would appear as a template-error), but the Go stdlib `template`
inserts `<no value>` in that situation. That might not be ideal, but
it's not something to fix at this moment.

Refs:
 - https://issues.redhat.com/browse/ACM-4177

Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
@openshift-ci
Copy link

openshift-ci bot commented Apr 6, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JustinKuli, mprahl

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@JustinKuli
Copy link
Contributor Author

This test really hates me

@mprahl
Copy link
Contributor

mprahl commented Apr 6, 2023

The prune test should be more stable after this fix:
open-cluster-management-io/config-policy-controller#118

I need to file a follow-up Jira to make the code around handling status update failures more robust in general when pruneObjectBehavior is used.

@openshift-merge-robot openshift-merge-robot merged commit 0c77a3b into stolostron:main Apr 7, 2023
@JustinKuli JustinKuli deleted the 4177-managed-cluster-labels-tests branch April 10, 2023 13: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