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

Fix e2e test #197

Merged
merged 1 commit into from
Jan 10, 2023
Merged

Conversation

Vincent056
Copy link

This PR is to fix TestKubeletConfigRemediation e2e test

@jhrozek
Copy link

jhrozek commented Jan 9, 2023

Unfortunately the test is still failing :-(

@Vincent056 Vincent056 force-pushed the fix_e2e branch 2 times, most recently from 35e2d20 to 7b8ed41 Compare January 10, 2023 01:18
This PR is to fix TestKubeletConfigRemediation e2e test
@rhmdnd
Copy link

rhmdnd commented Jan 10, 2023

This PR is to fix TestKubeletConfigRemediation e2e test

What was the issue?

@Vincent056
Copy link
Author

This PR is to fix TestKubeletConfigRemediation e2e test

What was the issue?

There was some issue with the rule in the test content image

@@ -3557,7 +3529,7 @@ func TestE2E(t *testing.T) {

// We need to check that the remediation is auto-applied and save
Copy link

Choose a reason for hiding this comment

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

We could check that the check we're remediating failed before we attempt to fix it. I'm thinking about if the defaults change or for some reason the check starts to pass automatically, we wouldn't be testing the remediation, would we?

Copy link
Author

Choose a reason for hiding this comment

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

If the check pass, it will not generate a remediation here

Copy link

Choose a reason for hiding this comment

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

Don't we want to test that it does?

Copy link
Author

@Vincent056 Vincent056 Jan 10, 2023

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

do you mean check the result of the first scan:

err = waitForSuiteScansStatus(t, f, namespace, suiteName, compv1alpha1.PhaseDone, compv1alpha1.ResultNonCompliant)

Copy link

Choose a reason for hiding this comment

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

Aha - got it, thanks!

Copy link
Author

Choose a reason for hiding this comment

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

the GitHub diff sometimes doesn't show the full code haha

Copy link
Author

Choose a reason for hiding this comment

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

thanks for the review!

Rationale: "To be tested",
},
{
Name: "ocp4-version-detect-in-ocp",
Copy link

Choose a reason for hiding this comment

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

We're not checking the status of this below anywhere. Do we need it, or should we add an assertion for it?

Copy link
Author

Choose a reason for hiding this comment

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

do you mean the checkResult, I think it is being check at the end, on line 3565,

				err = assertHasCheck(f, suiteName, scanName, checkResult)

Copy link

@rhmdnd rhmdnd left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci
Copy link

openshift-ci bot commented Jan 10, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhmdnd, Vincent056

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

@Vincent056
Copy link
Author

Vincent056 commented Jan 10, 2023

adding qe, px, and docs approve because it is a e2e test change

@openshift-merge-robot openshift-merge-robot merged commit bcd5b6b into ComplianceAsCode:master Jan 10, 2023
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.

4 participants