-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add authentication to CLI when submitting jobs with priority #360
Add authentication to CLI when submitting jobs with priority #360
Conversation
442a39b
to
6aee42d
Compare
8bf4431
to
7fd149f
Compare
b2c6537
to
98ea5c0
Compare
7fd149f
to
6607d5a
Compare
6607d5a
to
4cbe5e4
Compare
6719eb5
to
aca7c23
Compare
4cbe5e4
to
5133174
Compare
d27c81d
to
47630d1
Compare
626b2ee
to
3df30ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't looked at all of this yet, but I noticed the tests section is completely empty. Can we get more details on how you tested this? I think it's also good to have some sort of unit tests that cover the new code here too.
Just added 2 unit tests - is there any other functionality you think it would be beneficial to test? |
69c322e
to
ae353c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of very minor things
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkmate, +1 :)
Description
Requires #335 and #361. This updates the submit command in the Testflinger CLI to authenticate clients and authorize jobs that specify a job_priority in the yaml. For these jobs, the CLI will first get a token from the server, which requires a client_id and client-key. These can be specified as an environment variable, in the command line options, or in the config. The CLI will submit this token with the job.
Resolved issues
Resolves https://warthogs.atlassian.net/browse/CERTTF-372
Documentation
Documentation was added to the CLI README and submit-job documentation in docs/
Web service API changes
N/A
Tests
Unit tests were added to test_cli.py. These tests test that the JWT received from the authentication endpoint is passed with the job for jobs with priority, and jobs with priority are rejected when client credentials aren't specified in the CLI.