summaryrefslogtreecommitdiff
path: root/spec/integration/client/client_spec.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-09-21 15:04:09 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2019-03-11 12:20:20 -0700
commitdf23dbbda7d4eb621804f004ff85181d83a11641 (patch)
treedc4ac3d354e5b9eb3229ed9be56d5447cc9a1d85 /spec/integration/client/client_spec.rb
parentb870d8c578a6424e405ec2083d5f47d331f09d14 (diff)
downloadchef-df23dbbda7d4eb621804f004ff85181d83a11641.tar.gz
WIP: Remove audit mode from chef-client
This just gives us a line count to the change and perhaps a starting point for when we do this in Chef 15 Signed-off-by: Tim Smith <tsmith@chef.io> Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/integration/client/client_spec.rb')
-rw-r--r--spec/integration/client/client_spec.rb39
1 files changed, 0 insertions, 39 deletions
diff --git a/spec/integration/client/client_spec.rb b/spec/integration/client/client_spec.rb
index d15a7d2afa..afe94f854e 100644
--- a/spec/integration/client/client_spec.rb
+++ b/spec/integration/client/client_spec.rb
@@ -407,45 +407,6 @@ describe "chef-client" do
end
end
- when_the_repository "has a cookbook with only an audit recipe" do
-
- before do
- file "config/client.rb", <<~EOM
- local_mode true
- cookbook_path "#{path_to('cookbooks')}"
- audit_mode :enabled
- EOM
- end
-
- it "should exit with a zero code when there is not an audit failure" do
- file "cookbooks/audit_test/recipes/succeed.rb", <<~RECIPE
- control_group "control group without top level control" do
- it "should succeed" do
- expect(2 - 2).to eq(0)
- end
- end
- RECIPE
-
- result = shell_out("#{chef_client} -c \"#{path_to('config/client.rb')}\" -o 'audit_test::succeed' -l info", cwd: chef_dir)
- expect(result.error?).to be_falsey
- expect(result.stdout).to include("Successfully executed all `control_group` blocks and contained examples")
- end
-
- it "should exit with a non-zero code when there is an audit failure" do
- file "cookbooks/audit_test/recipes/fail.rb", <<~RECIPE
- control_group "control group without top level control" do
- it "should fail" do
- expect(2 - 2).to eq(1)
- end
- end
- RECIPE
-
- result = shell_out("#{chef_client} -c \"#{path_to('config/client.rb')}\" -o 'audit_test::fail'", cwd: chef_dir)
- expect(result.error?).to be_truthy
- expect(result.stdout).to include("Failure/Error: expect(2 - 2).to eq(1)")
- end
- end
-
when_the_repository "has a cookbook that deploys a file" do
before do
file "cookbooks/x/recipes/default.rb", <<~RECIPE