-
Notifications
You must be signed in to change notification settings - Fork 49
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: monitor-only not being set properly when false/no passed in config #285
Fix: monitor-only not being set properly when false/no passed in config #285
Conversation
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.
Left note inline for a refactor + some unit tests.
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.
small notes inline for the tests.
val = False | ||
for f in FALSY_VALUES: | ||
val = convert_arg_to_bool(f) | ||
self.assertFalse(val) |
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.
We'll want this in the loop - it's OK if the test fails after the first failing instance. We don't have to worry about subtests.
You also won't need to initialize val
, then.
"Error. Invalid boolean provided in config or parameters. " | ||
+ "Defaulting to False.", | ||
) | ||
self.assertFalse(val) |
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.
same here
val = True | ||
for t in TRUTHY_VALUES: | ||
val = convert_arg_to_bool(t) | ||
self.assertTrue(val) |
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.
same here
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.
LGTM 🚢 🦛
Manual testing went well - I ran scripts/landscape-client
with various --monitor-only
values to confirm that Manager plugins only run when it's false
.
Manual Testing
Verify Bug
Verify Fix