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: allow read-only "auth_type" attribute on credential API response #540

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

infinitewarp
Copy link
Member

This change supports quipucords/quipucords#2735

Copy link

codecov bot commented Sep 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.33%. Comparing base (ae26f6b) to head (56a1ef4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #540   +/-   ##
=======================================
  Coverage   78.33%   78.33%           
=======================================
  Files           7        7           
  Lines         683      683           
=======================================
  Hits          535      535           
  Misses        148      148           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@infinitewarp
Copy link
Member Author

Standalone test run with updated quipucords image and camayoc:
https://stage-jenkins-csb-smqe.apps.ocp-c1.prod.psi.redhat.com/view/Discovery/job/discovery-standalone/198/

@infinitewarp infinitewarp marked this pull request as ready for review September 16, 2024 19:13
Copy link
Collaborator

@mirekdlugosz mirekdlugosz left a comment

Choose a reason for hiding this comment

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

Would it make sense to include actual expected value and make assertions stronger this way?

Most of the tests pass password or ssh_keyfile, so they do know what auth_type value they expect to see in response.

@infinitewarp
Copy link
Member Author

I updated the regex pattern and surrounding logic to match on the specified data["auth_type"] if provided else anything from the current list of valid auth_type values. Here is another successful standalone CI run after pushing those changes:

https://stage-jenkins-csb-smqe.apps.ocp-c1.prod.psi.redhat.com/view/Discovery/job/discovery-standalone/199/

Copy link
Collaborator

@mirekdlugosz mirekdlugosz left a comment

Choose a reason for hiding this comment

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

That default is more than I asked for 😃 . Thanks!

@infinitewarp infinitewarp merged commit 5ffa7e3 into main Sep 18, 2024
8 of 9 checks passed
@infinitewarp infinitewarp deleted the credentials-api-auth-type branch September 18, 2024 15:28
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.

3 participants