Skip to content

Commit

Permalink
fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sco11morgan committed Jan 11, 2020
1 parent 461f319 commit 87e8a6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/krane/kubernetes_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class KubernetesResource
TIMEOUT = 5.minutes
LOG_LINE_COUNT = 250
SERVER_DRY_RUN_DISABLED_ERROR =
/(unknown flag: --server-dry-run)|(does[\s\']n[o|']t support dry[-\s]run)|(dryRun alpha feature is disabled)/
/(unknown flag: --server-dry-run)|(does[\s\']n[o|']t support dry[-\s]run)|(dryRun alpha feature is disabled)/

DISABLE_FETCHING_LOG_INFO = 'DISABLE_FETCHING_LOG_INFO'
DISABLE_FETCHING_EVENT_INFO = 'DISABLE_FETCHING_EVENT_INFO'
Expand Down
8 changes: 4 additions & 4 deletions test/unit/krane/kubernetes_resource_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ def test_validate_definition_ignores_server_dry_run_unsupported_by_webhook_respo
kubectl.expects(:run)
.with('apply', '-f', anything, '--server-dry-run', '--output=name', anything)
.returns([
"Some Raw Output",
"Error from kubectl: admission webhook some-webhook does not support dry run",
stub(success?: false),
])
"Some Raw Output",
"Error from kubectl: admission webhook some-webhook does not support dry run",
stub(success?: false),
])
resource.validate_definition(kubectl)
refute(resource.validation_failed?, "Failed to ignore server dry run responses matching:
#{Krane::KubernetesResource::SERVER_DRY_RUN_DISABLED_ERROR}")
Expand Down

0 comments on commit 87e8a6b

Please sign in to comment.