-
Notifications
You must be signed in to change notification settings - Fork 115
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
Skip collecting logs and events on failure via env var #239
Changes from 4 commits
27d0230
55b4df2
5997abc
d61e3d8
06661fb
fdb5ca3
ffe52a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,6 +183,18 @@ def test_deploy_timed_out_respects_annotation_based_timeouts | |
end | ||
end | ||
|
||
def test_debug_message_with_no_debug_info | ||
ENV['NO_DEBUG_INFO'] = 'true' | ||
dummy = DummyResource.new | ||
dummy.expects(:deploy_failed?).returns(true) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of using a stub, let's make this settable the same way we have done for |
||
|
||
assert_match dummy.debug_message, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's also refute that it matches |
||
"DummyResource/test: FAILED\n - Final status: Unknown\n" + | ||
KubernetesDeploy::KubernetesResource::NO_DEBUG_INFO_MESSAGE | ||
ensure | ||
ENV['NO_DEBUG_INFO'] = nil | ||
end | ||
|
||
private | ||
|
||
def timeout_override_err_prefix | ||
|
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.
Nit: let's make the env var string itself a constant too, since it's used in three places.