Skip to content

Commit

Permalink
Update: --prune-allowlist -> --prune-allowlist
Browse files Browse the repository at this point in the history
  • Loading branch information
epk committed Aug 29, 2023
1 parent 34a2c44 commit 93a659c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/krane/resource_deployer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def apply_all(resources, prune, dry_run: false)
else
command.push("--all")
end
@prune_whitelist.each { |type| command.push("--prune-whitelist=#{type}") }
@prune_whitelist.each { |type| command.push("--prune-allowlist=#{type}") }
end

command.push(kubectl.dry_run_flag) if dry_run
Expand Down
4 changes: 2 additions & 2 deletions test/unit/krane/resource_deployer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def test_deploy_prune_builds_whitelist
whitelist_kind = "fake_kind"
resource = build_mock_resource
Krane::Kubectl.any_instance.expects(:run).with do |*args|
args.include?("--prune-whitelist=#{whitelist_kind}")
args.include?("--prune-allowlist=#{whitelist_kind}")
end.returns(["", "", stub(success?: true)])
resource_deployer(kubectl_times: 0, prune_whitelist: [whitelist_kind]).deploy!([resource], false, true)
end
Expand All @@ -16,7 +16,7 @@ def test_deploy_no_prune_doesnt_prune
whitelist_kind = "fake_kind"
resource = build_mock_resource
Krane::Kubectl.any_instance.expects(:run).with do |*args|
!args.include?("--prune-whitelist=#{whitelist_kind}")
!args.include?("--prune-allowlist=#{whitelist_kind}")
end.returns(["", "", stub(success?: true)])
resource_deployer(kubectl_times: 0, prune_whitelist: [whitelist_kind]).deploy!([resource], false, false)
end
Expand Down

0 comments on commit 93a659c

Please sign in to comment.