diff options
author | Claire McQuin <claire@getchef.com> | 2015-01-14 11:40:48 -0800 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2015-01-15 15:34:33 -0800 |
commit | 4cbc6274889ddedf105ec99200f53b50439df273 (patch) | |
tree | e42d111f7f20f45377f0dbbdeb4e5ef377c9c9f0 /kitchen-tests | |
parent | d1a70027b68b1ba6d36eea3bc38d5441a61f22f8 (diff) | |
download | chef-4cbc6274889ddedf105ec99200f53b50439df273.tar.gz |
Update DSL method name to controls_group.mcquin/control_group
Update to use control_group.
Unify wording along control_group.
Unify wording along control_group.
Fix typo.
Enable audit mode.
Update to use control_group syntax.
Update for audit DSL changes.
Update for audit DSL change.
Diffstat (limited to 'kitchen-tests')
9 files changed, 15 insertions, 13 deletions
diff --git a/kitchen-tests/.chef/client.rb b/kitchen-tests/.chef/client.rb index 98f773d691..be46e2e8d7 100644 --- a/kitchen-tests/.chef/client.rb +++ b/kitchen-tests/.chef/client.rb @@ -6,3 +6,5 @@ log_level :info chef_repo_path repo_dir local_mode true cache_path "#{ENV['HOME']}/.cache/chef" + +audit_mode :enabled
\ No newline at end of file diff --git a/kitchen-tests/cookbooks/audit_test/recipes/default.rb b/kitchen-tests/cookbooks/audit_test/recipes/default.rb index 4f634d73c1..833c12064a 100644 --- a/kitchen-tests/cookbooks/audit_test/recipes/default.rb +++ b/kitchen-tests/cookbooks/audit_test/recipes/default.rb @@ -4,7 +4,7 @@ # # Copyright (c) 2014 The Authors, All Rights Reserved. -controls "basic control group" do +control_group "basic control group" do control "basic math" do it "should pass" do expect(2 - 2).to eq(0) @@ -12,15 +12,15 @@ controls "basic control group" do end end -controls "control group without top level control" do +control_group "control group without top level control" do it "should pass" do expect(2 - 2).to eq(0) end end -controls "control group with empty control" do +control_group "control group with empty control" do control "empty" end -controls "empty control group with block" do +control_group "empty control group with block" do end diff --git a/kitchen-tests/cookbooks/audit_test/recipes/error_duplicate_control_groups.rb b/kitchen-tests/cookbooks/audit_test/recipes/error_duplicate_control_groups.rb index 77a4592e9d..82b358d4be 100644 --- a/kitchen-tests/cookbooks/audit_test/recipes/error_duplicate_control_groups.rb +++ b/kitchen-tests/cookbooks/audit_test/recipes/error_duplicate_control_groups.rb @@ -4,13 +4,13 @@ # # Copyright (c) 2014 The Authors, All Rights Reserved. -controls "basic control group" do +control_group "basic control group" do it "should pass" do expect(2 - 2).to eq(0) end end -controls "basic control group" do +control_group "basic control group" do it "should pass" do expect(2 - 2).to eq(0) end diff --git a/kitchen-tests/cookbooks/audit_test/recipes/error_no_block.rb b/kitchen-tests/cookbooks/audit_test/recipes/error_no_block.rb index 76a8817b5d..42da81aa4f 100644 --- a/kitchen-tests/cookbooks/audit_test/recipes/error_no_block.rb +++ b/kitchen-tests/cookbooks/audit_test/recipes/error_no_block.rb @@ -4,4 +4,4 @@ # # Copyright (c) 2014 The Authors, All Rights Reserved. -controls "empty control group without block" +control_group "empty control group without block" diff --git a/kitchen-tests/cookbooks/audit_test/recipes/error_orphan_control.rb b/kitchen-tests/cookbooks/audit_test/recipes/error_orphan_control.rb index d74acd6c6b..4f2a8e6c55 100644 --- a/kitchen-tests/cookbooks/audit_test/recipes/error_orphan_control.rb +++ b/kitchen-tests/cookbooks/audit_test/recipes/error_orphan_control.rb @@ -4,7 +4,7 @@ # # Copyright (c) 2014 The Authors, All Rights Reserved. -controls "basic control group" do +control_group "basic control group" do it "should pass" do expect(2 - 2).to eq(0) end diff --git a/kitchen-tests/cookbooks/audit_test/recipes/failed_specs.rb b/kitchen-tests/cookbooks/audit_test/recipes/failed_specs.rb index 3225d3983e..c5c2c32f0a 100644 --- a/kitchen-tests/cookbooks/audit_test/recipes/failed_specs.rb +++ b/kitchen-tests/cookbooks/audit_test/recipes/failed_specs.rb @@ -4,7 +4,7 @@ # # Copyright (c) 2014 The Authors, All Rights Reserved. -controls "basic control group" do +control_group "basic control group" do control "basic math" do # Can not write a good control :( it "should pass" do diff --git a/kitchen-tests/cookbooks/audit_test/recipes/serverspec_collision.rb b/kitchen-tests/cookbooks/audit_test/recipes/serverspec_collision.rb index 70109d84b8..c433bd1a90 100644 --- a/kitchen-tests/cookbooks/audit_test/recipes/serverspec_collision.rb +++ b/kitchen-tests/cookbooks/audit_test/recipes/serverspec_collision.rb @@ -9,7 +9,7 @@ file "/tmp/audit_test_file" do content "Welcome to audit mode." end -controls "file auditing" do +control_group "file auditing" do describe "test file" do it "says welcome" do expect(file("/tmp/audit_test_file")).to contain("Welcome") @@ -22,7 +22,7 @@ file "/tmp/audit_test_file_2" do content "Bye to audit mode." end -controls "end file auditing" do +control_group "end file auditing" do describe "end file" do it "says bye" do expect(file("/tmp/audit_test_file_2")).to contain("Bye") diff --git a/kitchen-tests/cookbooks/audit_test/recipes/serverspec_support.rb b/kitchen-tests/cookbooks/audit_test/recipes/serverspec_support.rb index 0396cc0de7..8b3c35a6bd 100644 --- a/kitchen-tests/cookbooks/audit_test/recipes/serverspec_support.rb +++ b/kitchen-tests/cookbooks/audit_test/recipes/serverspec_support.rb @@ -13,7 +13,7 @@ end # action :install # end -controls "serverspec helpers with types" do +control_group "serverspec helpers with types" do control "file helper" do it "says welcome" do expect(file("/tmp/audit_test_file")).to contain("Welcome") diff --git a/kitchen-tests/cookbooks/audit_test/recipes/with_include_recipe.rb b/kitchen-tests/cookbooks/audit_test/recipes/with_include_recipe.rb index ff39cde117..f795f7786a 100644 --- a/kitchen-tests/cookbooks/audit_test/recipes/with_include_recipe.rb +++ b/kitchen-tests/cookbooks/audit_test/recipes/with_include_recipe.rb @@ -6,7 +6,7 @@ include_recipe "audit_test::serverspec_collision" -controls "basic example" do +control_group "basic example" do it "should pass" do expect(2 - 2).to eq(0) end |