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

scorecard - add PATCH to list of methods in scorecard CR update test #2509

Merged
merged 2 commits into from
Feb 6, 2020
Merged

scorecard - add PATCH to list of methods in scorecard CR update test #2509

merged 2 commits into from
Feb 6, 2020

Conversation

jmccormick2001
Copy link
Contributor

Description of the change:

with this change, the scorecard basic test (updatecr) will add PATCH to the list of http methods checked from the proxy log, previously only PUT and POST were checked and if found would cause the scorecard test to pass.

Motivation for the change:

this issue arises when you have an operator that is NOT written with the SDK AND when you want that operator to pass the scorecard basic-test UpdateCR test. With this change, the proxy when it logs a PATCH http method, will cause the operator basic test (update cr) to detect the PATCH and pass the test.

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 6, 2020
Copy link
Contributor

@camilamacedo86 camilamacedo86 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-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 6, 2020
Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

Missing the CHANGELOG entry only.

Copy link
Member

@joelanford joelanford left a comment

Choose a reason for hiding this comment

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

One nit. Otherwise looks good.

/lgtm

@@ -170,15 +170,16 @@ func (t *WritingIntoCRsHasEffectTest) Run(ctx context.Context) *schelpers.TestRe
if !ok {
continue
}
if method == "PUT" || method == "POST" {

if method == "PUT" || method == "POST" || method == "PATCH" {
Copy link
Member

Choose a reason for hiding this comment

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

Non-blocking nit: change these to http.MethodPut, http.MethodPost, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed, good catch!

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 6, 2020
@openshift-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

@jmccormick2001 jmccormick2001 merged commit a8d2c2a into operator-framework:master Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants