-
Notifications
You must be signed in to change notification settings - Fork 21
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: add test for worker that requires no instance profile #481
test: add test for worker that requires no instance profile #481
Conversation
Signed-off-by: Li <[email protected]>
Signed-off-by: Li <[email protected]>
f836bdd
to
1039e9c
Compare
Quality Gate passedIssues Measures |
…line#481) * test: add test for worker that requires no instance profile Signed-off-by: Li <[email protected]>
function_worker_factory( | ||
dataclasses.replace( | ||
worker_config, | ||
disallow_instance_profile="True", |
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.
Is it expected to cause lint error?
test/e2e/test_worker_config.py:33: error: Unexpected keyword argument
"disallow_instance_profile" for "replace" of "DeadlineWorkerConfiguration" [call-arg]
dataclasses.replace(
^
Found 1 error in 1 file (checked 145 source files)
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.
I see it's due to an dependent change
What was the problem/requirement? (What/Why)
The worker agent is able to be installed with the option
disallow-instance-profile
, in which case if the worker instance is booted with an instance profile, the worker agent will shut itself down and not run jobs.We should verify that this functionality works as expected and that there are no regressions
What was the solution? (How)
Add a test to verify that the worker will not pick up any jobs in the case that the worker is configured to not have instance profiles, but the instance has a profile anyway.
Also upgraded test-fixtures version from 0.16 to 0.17 to allow for the option to disallow instance profile.
What is the impact of this change?
Better verification of worker agent installer code and behaviour.
How was this change tested?
Was this change documented?
No
Is this a breaking change?
No
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.