summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/audit/audit_reporter_spec.rb4
-rw-r--r--spec/unit/client_spec.rb4
-rw-r--r--spec/unit/cookbook/synchronizer_spec.rb4
-rw-r--r--spec/unit/cookbook_manifest_spec.rb18
-rw-r--r--spec/unit/cookbook_uploader_spec.rb4
-rw-r--r--spec/unit/cookbook_version_spec.rb6
-rw-r--r--spec/unit/environment_spec.rb8
-rw-r--r--spec/unit/http/authenticator_spec.rb2
-rw-r--r--spec/unit/http/socketless_chef_zero_client_spec.rb30
-rw-r--r--spec/unit/key_spec.rb2
-rw-r--r--spec/unit/knife/cookbook_upload_spec.rb4
-rw-r--r--spec/unit/knife/core/bootstrap_context_spec.rb2
-rw-r--r--spec/unit/knife/core/cookbook_scm_repo_spec.rb4
-rw-r--r--spec/unit/knife/core/node_editor_spec.rb8
-rw-r--r--spec/unit/knife/core/ui_spec.rb22
-rw-r--r--spec/unit/knife/ssl_check_spec.rb8
-rw-r--r--spec/unit/knife/ssl_fetch_spec.rb10
-rw-r--r--spec/unit/knife/supermarket_download_spec.rb8
-rw-r--r--spec/unit/knife_spec.rb2
-rw-r--r--spec/unit/mixin/shell_out_spec.rb44
-rw-r--r--spec/unit/node/attribute_spec.rb138
-rw-r--r--spec/unit/node_spec.rb10
-rw-r--r--spec/unit/provider/cron_spec.rb30
-rw-r--r--spec/unit/provider/execute_spec.rb10
-rw-r--r--spec/unit/provider/git_spec.rb2
-rw-r--r--spec/unit/provider/group/dscl_spec.rb4
-rw-r--r--spec/unit/provider/ifconfig/aix_spec.rb2
-rw-r--r--spec/unit/provider/ifconfig/debian_spec.rb4
-rw-r--r--spec/unit/provider/ifconfig_spec.rb2
-rw-r--r--spec/unit/provider/launchd_spec.rb14
-rw-r--r--spec/unit/provider/mount/aix_spec.rb12
-rw-r--r--spec/unit/provider/package/ips_spec.rb12
-rw-r--r--spec/unit/provider/package/macports_spec.rb2
-rw-r--r--spec/unit/provider/package/pacman_spec.rb6
-rw-r--r--spec/unit/provider/package/paludis_spec.rb8
-rw-r--r--spec/unit/provider/package/portage_spec.rb2
-rw-r--r--spec/unit/provider/package/solaris_spec.rb2
-rw-r--r--spec/unit/provider/service/arch_service_spec.rb4
-rw-r--r--spec/unit/provider/service/freebsd_service_spec.rb10
-rw-r--r--spec/unit/provider/service/init_service_spec.rb4
-rw-r--r--spec/unit/provider/service/invokercd_service_spec.rb4
-rw-r--r--spec/unit/provider/service/macosx_spec.rb8
-rw-r--r--spec/unit/provider/service/simple_service_spec.rb4
-rw-r--r--spec/unit/provider/template/content_spec.rb2
-rw-r--r--spec/unit/provider_resolver_spec.rb148
-rw-r--r--spec/unit/recipe_spec.rb2
-rw-r--r--spec/unit/resource/chocolatey_config_spec.rb2
-rw-r--r--spec/unit/resource/chocolatey_source_spec.rb2
-rw-r--r--spec/unit/resource/rhsm_subscription_spec.rb2
-rw-r--r--spec/unit/resource_spec.rb2
-rw-r--r--spec/unit/role_spec.rb2
-rw-r--r--spec/unit/util/dsc/lcm_output_parser_spec.rb26
-rw-r--r--spec/unit/util/dsc/local_configuration_manager_spec.rb6
53 files changed, 341 insertions, 341 deletions
diff --git a/spec/unit/audit/audit_reporter_spec.rb b/spec/unit/audit/audit_reporter_spec.rb
index 60e93a9331..0a023babd0 100644
--- a/spec/unit/audit/audit_reporter_spec.rb
+++ b/spec/unit/audit/audit_reporter_spec.rb
@@ -103,7 +103,7 @@ describe Chef::Audit::AuditReporter do
Chef::Exceptions::AuditError: Audit phase failed with error message: derpderpderp
/path/recipe.rb:57
/path/library.rb:106
-EOM
+ EOM
end
end
@@ -273,7 +273,7 @@ EOM
Chef::Exceptions::AuditError: Audit phase failed with error message: derpderpderp
/path/recipe.rb:57
/path/library.rb:106
-EOM
+ EOM
end
end
end
diff --git a/spec/unit/client_spec.rb b/spec/unit/client_spec.rb
index 1d9dd54290..54bd7eab55 100644
--- a/spec/unit/client_spec.rb
+++ b/spec/unit/client_spec.rb
@@ -412,7 +412,7 @@ describe Chef::Client do
let(:required_recipe) do
<<~EOM
fake_recipe_variable = "for reals"
-EOM
+ EOM
end
context "when required_recipe is configured" do
@@ -431,7 +431,7 @@ EOM
let(:required_recipe) do
<<~EOM
this is not a recipe
-EOM
+ EOM
end
it "should not raise an error" do
expect { client.load_required_recipe(rest, run_context) }.not_to raise_error()
diff --git a/spec/unit/cookbook/synchronizer_spec.rb b/spec/unit/cookbook/synchronizer_spec.rb
index 8421b1ffd1..1291b230c1 100644
--- a/spec/unit/cookbook/synchronizer_spec.rb
+++ b/spec/unit/cookbook/synchronizer_spec.rb
@@ -63,7 +63,7 @@ describe Chef::CookbookSynchronizer do
{
"path" => "recipes/default.rb",
"name" => "recipes/default.rb",
- "url" => "http://chef.example.com/abc123",
+ "url" => "http://chef.example.com/abc123",
"checksum" => "abc123",
}
end
@@ -72,7 +72,7 @@ describe Chef::CookbookSynchronizer do
{
"path" => "attributes/default.rb",
"name" => "attributes/default.rb",
- "url" => "http://chef.example.com/abc456",
+ "url" => "http://chef.example.com/abc456",
"checksum" => "abc456",
}
end
diff --git a/spec/unit/cookbook_manifest_spec.rb b/spec/unit/cookbook_manifest_spec.rb
index 417a067451..b28ab573c5 100644
--- a/spec/unit/cookbook_manifest_spec.rb
+++ b/spec/unit/cookbook_manifest_spec.rb
@@ -89,10 +89,10 @@ describe Chef::CookbookManifest do
{
"chef_type" => "cookbook_version",
- "name" => "tatft-1.2.3",
- "version" => "1.2.3",
+ "name" => "tatft-1.2.3",
+ "version" => "1.2.3",
"cookbook_name" => "tatft",
- "metadata" => metadata,
+ "metadata" => metadata,
"frozen?" => false,
@@ -129,9 +129,9 @@ describe Chef::CookbookManifest do
end
{
- "name" => name,
- "path" => relative_path,
- "checksum" => Chef::Digester.generate_md5_checksum_for_file(path),
+ "name" => name,
+ "path" => relative_path,
+ "checksum" => Chef::Digester.generate_md5_checksum_for_file(path),
"specificity" => "default",
}.tap do |fp|
if full
@@ -145,10 +145,10 @@ describe Chef::CookbookManifest do
{
"chef_type" => "cookbook_version",
- "name" => "tatft-1.2.3",
- "version" => "1.2.3",
+ "name" => "tatft-1.2.3",
+ "version" => "1.2.3",
"cookbook_name" => "tatft",
- "metadata" => metadata,
+ "metadata" => metadata,
"frozen?" => false,
diff --git a/spec/unit/cookbook_uploader_spec.rb b/spec/unit/cookbook_uploader_spec.rb
index 26e8d28454..2adecfaa82 100644
--- a/spec/unit/cookbook_uploader_spec.rb
+++ b/spec/unit/cookbook_uploader_spec.rb
@@ -96,8 +96,8 @@ describe Chef::CookbookUploader do
upload_headers = {
"content-type" => "application/x-binary",
- "content-md5" => an_instance_of(String),
- "accept" => "application/json",
+ "content-md5" => an_instance_of(String),
+ "accept" => "application/json",
}
expect(http_client).to receive(:put)
diff --git a/spec/unit/cookbook_version_spec.rb b/spec/unit/cookbook_version_spec.rb
index 83fb3f578f..3dff9e94d8 100644
--- a/spec/unit/cookbook_version_spec.rb
+++ b/spec/unit/cookbook_version_spec.rb
@@ -45,12 +45,12 @@ describe Chef::CookbookVersion do
end
describe "with a cookbook directory named tatft" do
- MD5 = /[0-9a-f]{32}/
+ MD5 = /[0-9a-f]{32}/.freeze
let(:cookbook_paths_by_type) do
{
# Dunno if the paths here are representitive of what is set by CookbookLoader...
- all_files: Dir[File.join(cookbook_root, "**", "**")],
+ all_files: Dir[File.join(cookbook_root, "**", "**")],
}
end
@@ -117,7 +117,7 @@ describe Chef::CookbookVersion do
let(:cookbook_paths_by_type) do
{
- all_files: Dir[File.join(cookbook_root, "**", "**")],
+ all_files: Dir[File.join(cookbook_root, "**", "**")],
}
end
diff --git a/spec/unit/environment_spec.rb b/spec/unit/environment_spec.rb
index 483ee615a2..1841707c2d 100644
--- a/spec/unit/environment_spec.rb
+++ b/spec/unit/environment_spec.rb
@@ -104,8 +104,8 @@ describe Chef::Environment do
describe "cookbook_versions" do
before(:each) do
@cookbook_versions = {
- "apt" => "= 1.0.0",
- "god" => "= 2.0.0",
+ "apt" => "= 1.0.0",
+ "god" => "= 2.0.0",
"apache2" => "= 4.2.0",
}
end
@@ -243,8 +243,8 @@ describe Chef::Environment do
describe "self.validate_cookbook_versions" do
before(:each) do
@cookbook_versions = {
- "apt" => "= 1.0.0",
- "god" => "= 2.0.0",
+ "apt" => "= 1.0.0",
+ "god" => "= 2.0.0",
"apache2" => "= 4.2.0",
}
end
diff --git a/spec/unit/http/authenticator_spec.rb b/spec/unit/http/authenticator_spec.rb
index 4a919ad492..a2d4cb4815 100644
--- a/spec/unit/http/authenticator_spec.rb
+++ b/spec/unit/http/authenticator_spec.rb
@@ -108,7 +108,7 @@ describe Chef::HTTP::Authenticator do
wxpGV4dGtdcahwXNE4601aXPra+xPcRd2puCNoEDBzgVuTSsLYeKBDMSfs173W1Q
YwIDAQAB
-----END PUBLIC KEY-----
-EOH
+ EOH
let(:class_instance) { Chef::HTTP::Authenticator.new(client_name: "test", raw_key: public_key, ssh_agent_signing: true) }
diff --git a/spec/unit/http/socketless_chef_zero_client_spec.rb b/spec/unit/http/socketless_chef_zero_client_spec.rb
index 4f3aed13c5..4bbc4f6768 100644
--- a/spec/unit/http/socketless_chef_zero_client_spec.rb
+++ b/spec/unit/http/socketless_chef_zero_client_spec.rb
@@ -38,13 +38,13 @@ describe Chef::HTTP::SocketlessChefZeroClient do
let(:expected_rack_req) do
{
- "SCRIPT_NAME" => "",
- "SERVER_NAME" => "localhost",
- "REQUEST_METHOD" => method.to_s.upcase,
- "PATH_INFO" => uri.path,
- "QUERY_STRING" => uri.query,
- "SERVER_PORT" => uri.port,
- "HTTP_HOST" => "localhost:#{uri.port}",
+ "SCRIPT_NAME" => "",
+ "SERVER_NAME" => "localhost",
+ "REQUEST_METHOD" => method.to_s.upcase,
+ "PATH_INFO" => uri.path,
+ "QUERY_STRING" => uri.query,
+ "SERVER_PORT" => uri.port,
+ "HTTP_HOST" => "localhost:#{uri.port}",
"rack.url_scheme" => "chefzero",
}
end
@@ -137,16 +137,16 @@ describe Chef::HTTP::SocketlessChefZeroClient do
let(:expected_rack_req) do
{
- "SCRIPT_NAME" => "",
- "SERVER_NAME" => "localhost",
- "REQUEST_METHOD" => method.to_s.upcase,
- "PATH_INFO" => uri.path,
- "QUERY_STRING" => uri.query,
- "SERVER_PORT" => uri.port,
- "HTTP_HOST" => "localhost:#{uri.port}",
+ "SCRIPT_NAME" => "",
+ "SERVER_NAME" => "localhost",
+ "REQUEST_METHOD" => method.to_s.upcase,
+ "PATH_INFO" => uri.path,
+ "QUERY_STRING" => uri.query,
+ "SERVER_PORT" => uri.port,
+ "HTTP_HOST" => "localhost:#{uri.port}",
"HTTP_X_OPS_SERVER_API_VERSION" => "2",
"rack.url_scheme" => "chefzero",
- "rack.input" => an_instance_of(StringIO),
+ "rack.input" => an_instance_of(StringIO),
}
end
diff --git a/spec/unit/key_spec.rb b/spec/unit/key_spec.rb
index ea2eae3df7..63c5982137 100644
--- a/spec/unit/key_spec.rb
+++ b/spec/unit/key_spec.rb
@@ -34,7 +34,7 @@ describe Chef::Key do
Tfuc9dUYsFjptWYrV6pfEQ+bgo1OGBXORBFcFL+2D7u9JYquKrMgosznHoEkQNLo
0wIDAQAB
-----END PUBLIC KEY-----
-EOS
+ EOS
end
shared_examples_for "fields with username type validation" do
diff --git a/spec/unit/knife/cookbook_upload_spec.rb b/spec/unit/knife/cookbook_upload_spec.rb
index ba0d57c5d6..8bff31197c 100644
--- a/spec/unit/knife/cookbook_upload_spec.rb
+++ b/spec/unit/knife/cookbook_upload_spec.rb
@@ -172,7 +172,7 @@ describe Chef::Knife::CookbookUpload do
before(:each) do
cookbook.metadata.depends("dependency")
allow(cookbook_loader).to receive(:[]) do |ckbk|
- { "test_cookbook" => cookbook,
+ { "test_cookbook" => cookbook,
"dependency" => cookbook_dependency }[ckbk]
end
allow(knife).to receive(:cookbook_names).and_return(%w{cookbook_dependency test_cookbook})
@@ -198,7 +198,7 @@ describe Chef::Knife::CookbookUpload do
cookbook_dependency2 = Chef::CookbookVersion.new("dependency2")
cookbook.metadata.depends("dependency2")
allow(cookbook_loader).to receive(:[]) do |ckbk|
- { "test_cookbook" => cookbook,
+ { "test_cookbook" => cookbook,
"dependency" => cookbook_dependency,
"dependency2" => cookbook_dependency2 }[ckbk]
end
diff --git a/spec/unit/knife/core/bootstrap_context_spec.rb b/spec/unit/knife/core/bootstrap_context_spec.rb
index bd48709a93..5aa176557f 100644
--- a/spec/unit/knife/core/bootstrap_context_spec.rb
+++ b/spec/unit/knife/core/bootstrap_context_spec.rb
@@ -75,7 +75,7 @@ describe Chef::Knife::Core::BootstrapContext do
log_level :info
log_location "/tmp/log"
# Using default node name (fqdn)
-EXPECTED
+ EXPECTED
expect(bootstrap_context.config_content).to eq expected
end
diff --git a/spec/unit/knife/core/cookbook_scm_repo_spec.rb b/spec/unit/knife/core/cookbook_scm_repo_spec.rb
index a530dbcdaa..a72c184f19 100644
--- a/spec/unit/knife/core/cookbook_scm_repo_spec.rb
+++ b/spec/unit/knife/core/cookbook_scm_repo_spec.rb
@@ -35,7 +35,7 @@ describe Chef::Knife::CookbookSCMRepo do
chef-vendor-graphite
chef-vendor-python
chef-vendor-absent-new
-BRANCHES
+ BRANCHES
end
it "has a path to the cookbook repo" do
@@ -84,7 +84,7 @@ BRANCHES
@dirty_status = Mixlib::ShellOut.new
@dirty_status.stdout.replace(<<-DIRTY)
M chef/lib/chef/knife/cookbook_site_install.rb
-DIRTY
+ DIRTY
expect(@cookbook_repo).to receive(:shell_out!).with("git status --porcelain", cwd: @repo_path).and_return(@dirty_status)
expect { @cookbook_repo.sanity_check }.to raise_error(SystemExit)
end
diff --git a/spec/unit/knife/core/node_editor_spec.rb b/spec/unit/knife/core/node_editor_spec.rb
index a3dd63177d..ccf6776593 100644
--- a/spec/unit/knife/core/node_editor_spec.rb
+++ b/spec/unit/knife/core/node_editor_spec.rb
@@ -24,10 +24,10 @@ describe Chef::Knife::NodeEditor do
{ "name" => "test_node",
"chef_environment" => "production",
"automatic" => { "foo" => "bar" },
- "default" => { "alpha" => { "bravo" => "charlie", "delta" => "echo" } },
- "normal" => { "alpha" => { "bravo" => "hotel" }, "tags" => [] },
- "override" => { "alpha" => { "bravo" => "foxtrot", "delta" => "golf" } },
- "policy_name" => nil,
+ "default" => { "alpha" => { "bravo" => "charlie", "delta" => "echo" } },
+ "normal" => { "alpha" => { "bravo" => "hotel" }, "tags" => [] },
+ "override" => { "alpha" => { "bravo" => "foxtrot", "delta" => "golf" } },
+ "policy_name" => nil,
"policy_group" => nil,
"run_list" => %w{role[comedy] role[drama] recipe[mystery]},
}
diff --git a/spec/unit/knife/core/ui_spec.rb b/spec/unit/knife/core/ui_spec.rb
index 025c1ecd91..e5f19a4837 100644
--- a/spec/unit/knife/core/ui_spec.rb
+++ b/spec/unit/knife/core/ui_spec.rb
@@ -214,7 +214,7 @@ describe Chef::Knife::UI do
expect(@out.string).to eq <<~EOM
hi: a
lo: b
-EOM
+ EOM
end
it "formats empty hashes appropriately" do
@@ -227,7 +227,7 @@ EOM
expect(@out.string).to eq <<~EOM
a
b
-EOM
+ EOM
end
it "formats empty arrays appropriately" do
@@ -253,7 +253,7 @@ EOM
c
d
-EOM
+ EOM
end
it "formats nested arrays with single- and empty subarrays appropriately" do
@@ -267,7 +267,7 @@ EOM
d
e
-EOM
+ EOM
end
it "formats arrays of hashes with extra lines in between for readability" do
@@ -280,7 +280,7 @@ EOM
m: n
o: p
-EOM
+ EOM
end
it "formats hashes with empty array members appropriately" do
@@ -288,7 +288,7 @@ EOM
expect(@out.string).to eq <<~EOM
a:
b: c
-EOM
+ EOM
end
it "formats hashes with single-member array values appropriately" do
@@ -296,7 +296,7 @@ EOM
expect(@out.string).to eq <<~EOM
a: foo
b: c
-EOM
+ EOM
end
it "formats hashes with array members appropriately" do
@@ -306,7 +306,7 @@ EOM
foo
bar
b: c
-EOM
+ EOM
end
it "formats hashes with single-member nested array values appropriately" do
@@ -315,7 +315,7 @@ EOM
a:
foo
b: c
-EOM
+ EOM
end
it "formats hashes with nested array values appropriately" do
@@ -332,7 +332,7 @@ EOM
aa: bb
cc: dd
b: c
-EOM
+ EOM
end
it "formats hashes with empty hash values appropriately" do
@@ -340,7 +340,7 @@ EOM
expect(@out.string).to eq <<~EOM
a:
b: c
-EOM
+ EOM
end
end
diff --git a/spec/unit/knife/ssl_check_spec.rb b/spec/unit/knife/ssl_check_spec.rb
index 9092110b95..58eae312f6 100644
--- a/spec/unit/knife/ssl_check_spec.rb
+++ b/spec/unit/knife/ssl_check_spec.rb
@@ -69,10 +69,10 @@ describe Chef::Knife::SslCheck do
expect { ssl_check.run }.to raise_error(SystemExit)
expected_stdout = <<~E
USAGE: knife ssl check [URL] (options)
-E
+ E
expected_stderr = <<~E
ERROR: Given URI: `foo.test' is invalid
-E
+ E
expect(stdout_io.string).to eq(expected_stdout)
expect(stderr_io.string).to eq(expected_stderr)
end
@@ -85,10 +85,10 @@ E
expect { ssl_check.run }.to raise_error(SystemExit)
expected_stdout = <<~E
USAGE: knife ssl check [URL] (options)
-E
+ E
expected_stderr = <<~E
ERROR: Given URI: `#{name_args[0]}' is invalid
-E
+ E
expect(stdout_io.string).to eq(expected_stdout)
expect(stderr_io.string).to eq(expected_stderr)
end
diff --git a/spec/unit/knife/ssl_fetch_spec.rb b/spec/unit/knife/ssl_fetch_spec.rb
index 45dd27ceec..fb904074b3 100644
--- a/spec/unit/knife/ssl_fetch_spec.rb
+++ b/spec/unit/knife/ssl_fetch_spec.rb
@@ -70,10 +70,10 @@ describe Chef::Knife::SslFetch do
expect { ssl_fetch.run }.to raise_error(SystemExit)
expected_stdout = <<~E
USAGE: knife ssl fetch [URL] (options)
-E
+ E
expected_stderr = <<~E
ERROR: Given URI: `foo.test' is invalid
-E
+ E
expect(stdout_io.string).to eq(expected_stdout)
expect(stderr_io.string).to eq(expected_stderr)
end
@@ -86,10 +86,10 @@ E
expect { ssl_fetch.run }.to raise_error(SystemExit)
expected_stdout = <<~E
USAGE: knife ssl fetch [URL] (options)
-E
+ E
expected_stderr = <<~E
ERROR: Given URI: `#{name_args[0]}' is invalid
-E
+ E
expect(stdout_io.string).to eq(expected_stdout)
expect(stderr_io.string).to eq(expected_stderr)
end
@@ -190,7 +190,7 @@ E
expected_error_text = <<~ERROR_TEXT
ERROR: The service at the given URI (http://foo.example.com) does not accept SSL connections
ERROR: Perhaps you meant to connect to 'https://foo.example.com'?
-ERROR_TEXT
+ ERROR_TEXT
run
expect(stderr).to include(expected_error_text)
diff --git a/spec/unit/knife/supermarket_download_spec.rb b/spec/unit/knife/supermarket_download_spec.rb
index 0332bd4390..71120007e3 100644
--- a/spec/unit/knife/supermarket_download_spec.rb
+++ b/spec/unit/knife/supermarket_download_spec.rb
@@ -31,8 +31,8 @@ describe Chef::Knife::SupermarketDownload do
@cookbook_api_url = "https://supermarket.chef.io/api/v1/cookbooks"
@version = "1.0.2"
@version_us = @version.tr ".", "_"
- @current_data = { "deprecated" => false,
- "latest_version" => "#{@cookbook_api_url}/apache2/versions/#{@version_us}",
+ @current_data = { "deprecated" => false,
+ "latest_version" => "#{@cookbook_api_url}/apache2/versions/#{@version_us}",
"replacement" => "other_apache2" }
allow(@knife.ui).to receive(:stderr).and_return(@stderr)
@@ -60,7 +60,7 @@ describe Chef::Knife::SupermarketDownload do
context "when" do
before do
@cookbook_data = { "version" => @version,
- "file" => "http://example.com/apache2_#{@version_us}.tgz" }
+ "file" => "http://example.com/apache2_#{@version_us}.tgz" }
@temp_file = double( path: "/tmp/apache2_#{@version_us}.tgz" )
@file = File.join(Dir.pwd, "apache2-#{@version}.tar.gz")
end
@@ -125,7 +125,7 @@ describe Chef::Knife::SupermarketDownload do
@version = "1.0.1"
@version_us = @version.tr ".", "_"
@cookbook_data = { "version" => @version,
- "file" => "http://example.com/apache2_#{@version_us}.tgz" }
+ "file" => "http://example.com/apache2_#{@version_us}.tgz" }
@temp_file = double(path: "/tmp/apache2_#{@version_us}.tgz")
@file = File.join(Dir.pwd, "apache2-#{@version}.tar.gz")
@knife.name_args << @version
diff --git a/spec/unit/knife_spec.rb b/spec/unit/knife_spec.rb
index 67251b2cd9..d727501b60 100644
--- a/spec/unit/knife_spec.rb
+++ b/spec/unit/knife_spec.rb
@@ -576,7 +576,7 @@ describe Chef::Knife do
Use `knife ssl check` to troubleshoot your SSL configuration.
If your Chef Server uses a self-signed certificate, you can use
`knife ssl fetch` to make knife trust the server's certificates.
-MSG
+ MSG
expect(stderr.string).to include(expected_message)
end
diff --git a/spec/unit/mixin/shell_out_spec.rb b/spec/unit/mixin/shell_out_spec.rb
index a22060b25f..4f8e4dafac 100644
--- a/spec/unit/mixin/shell_out_spec.rb
+++ b/spec/unit/mixin/shell_out_spec.rb
@@ -72,11 +72,11 @@ describe Chef::Mixin::ShellOut do
options = { environment: { "HOME" => "/Users/morty" } }
expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, {
environment: {
- "HOME" => "/Users/morty",
- "LC_ALL" => Chef::Config[:internal_locale],
- "LANG" => Chef::Config[:internal_locale],
+ "HOME" => "/Users/morty",
+ "LC_ALL" => Chef::Config[:internal_locale],
+ "LANG" => Chef::Config[:internal_locale],
"LANGUAGE" => Chef::Config[:internal_locale],
- env_path => sanitized_path,
+ env_path => sanitized_path,
},
}).and_return(retobj)
shell_out_obj.send(method, cmd, options)
@@ -86,11 +86,11 @@ describe Chef::Mixin::ShellOut do
options = { environment: { "HOME" => "/Users/morty" } }
expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, {
environment: {
- "HOME" => "/Users/morty",
- "LC_ALL" => Chef::Config[:internal_locale],
- "LANG" => Chef::Config[:internal_locale],
+ "HOME" => "/Users/morty",
+ "LC_ALL" => Chef::Config[:internal_locale],
+ "LANG" => Chef::Config[:internal_locale],
"LANGUAGE" => Chef::Config[:internal_locale],
- env_path => sanitized_path,
+ env_path => sanitized_path,
},
}).and_return(retobj)
shell_out_obj.send(method, cmd, options)
@@ -115,11 +115,11 @@ describe Chef::Mixin::ShellOut do
options = { env: { "HOME" => "/Users/morty" } }
expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, {
env: {
- "HOME" => "/Users/morty",
- "LC_ALL" => Chef::Config[:internal_locale],
- "LANG" => Chef::Config[:internal_locale],
+ "HOME" => "/Users/morty",
+ "LC_ALL" => Chef::Config[:internal_locale],
+ "LANG" => Chef::Config[:internal_locale],
"LANGUAGE" => Chef::Config[:internal_locale],
- env_path => sanitized_path,
+ env_path => sanitized_path,
},
}).and_return(retobj)
shell_out_obj.send(method, cmd, options)
@@ -129,11 +129,11 @@ describe Chef::Mixin::ShellOut do
options = { env: { "HOME" => "/Users/morty" } }
expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, {
env: {
- "HOME" => "/Users/morty",
- "LC_ALL" => Chef::Config[:internal_locale],
- "LANG" => Chef::Config[:internal_locale],
+ "HOME" => "/Users/morty",
+ "LC_ALL" => Chef::Config[:internal_locale],
+ "LANG" => Chef::Config[:internal_locale],
"LANGUAGE" => Chef::Config[:internal_locale],
- env_path => sanitized_path,
+ env_path => sanitized_path,
},
}).and_return(retobj)
shell_out_obj.send(method, cmd, options)
@@ -147,10 +147,10 @@ describe Chef::Mixin::ShellOut do
expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, {
user: "morty",
environment: {
- "LC_ALL" => Chef::Config[:internal_locale],
- "LANG" => Chef::Config[:internal_locale],
+ "LC_ALL" => Chef::Config[:internal_locale],
+ "LANG" => Chef::Config[:internal_locale],
"LANGUAGE" => Chef::Config[:internal_locale],
- env_path => sanitized_path,
+ env_path => sanitized_path,
},
}).and_return(retobj)
shell_out_obj.send(method, cmd, options)
@@ -162,10 +162,10 @@ describe Chef::Mixin::ShellOut do
it "should set environment language settings to the configured internal locale" do
expect(Chef::Mixin::ShellOut).to receive(:shell_out_command).with(cmd, {
environment: {
- "LC_ALL" => Chef::Config[:internal_locale],
- "LANG" => Chef::Config[:internal_locale],
+ "LC_ALL" => Chef::Config[:internal_locale],
+ "LANG" => Chef::Config[:internal_locale],
"LANGUAGE" => Chef::Config[:internal_locale],
- env_path => sanitized_path,
+ env_path => sanitized_path,
},
}).and_return(retobj)
shell_out_obj.send(method, cmd)
diff --git a/spec/unit/node/attribute_spec.rb b/spec/unit/node/attribute_spec.rb
index c6fdf1e1c2..0f97a23ced 100644
--- a/spec/unit/node/attribute_spec.rb
+++ b/spec/unit/node/attribute_spec.rb
@@ -63,16 +63,16 @@ describe Chef::Node::Attribute do
"mtu" => "1280",
"type" => "gif",
"encapsulation" => "IPIP" },
- "vmnet8" => { "flags" => %w{UP BROADCAST SMART RUNNING SIMPLEX MULTICAST},
- "number" => "8",
- "addresses" => { "192.168.4.1" => { "broadcast" => "192.168.4.255",
- "netmask" => "255.255.255.0",
- "family" => "inet" },
- "00:50:56:c0:00:08" => { "family" => "lladdr" } },
- "mtu" => "1500",
- "type" => "vmnet",
- "arp" => { "192.168.4.255" => "ff:ff:ff:ff:ff:ff" },
- "encapsulation" => "Ethernet" },
+ "vmnet8" => { "flags" => %w{UP BROADCAST SMART RUNNING SIMPLEX MULTICAST},
+ "number" => "8",
+ "addresses" => { "192.168.4.1" => { "broadcast" => "192.168.4.255",
+ "netmask" => "255.255.255.0",
+ "family" => "inet" },
+ "00:50:56:c0:00:08" => { "family" => "lladdr" } },
+ "mtu" => "1500",
+ "type" => "vmnet",
+ "arp" => { "192.168.4.255" => "ff:ff:ff:ff:ff:ff" },
+ "encapsulation" => "Ethernet" },
"en0" => { "status" => "inactive",
"flags" => %w{UP BROADCAST SMART RUNNING SIMPLEX MULTICAST},
"number" => "0",
@@ -81,8 +81,8 @@ describe Chef::Node::Attribute do
"media" => { "supported" => { "autoselect" => { "options" => [] },
"none" => { "options" => [] },
"1000baseT" => { "options" => ["full-duplex", "flow-control", "hw-loopback"] },
- "10baseT/UTP" => { "options" => ["half-duplex", "full-duplex", "flow-control", "hw-loopback"] },
- "100baseTX" => { "options" => ["half-duplex", "full-duplex", "flow-control", "hw-loopback"] } },
+ "10baseT/UTP" => { "options" => ["half-duplex", "full-duplex", "flow-control", "hw-loopback"] },
+ "100baseTX" => { "options" => ["half-duplex", "full-duplex", "flow-control", "hw-loopback"] } },
"selected" => { "autoselect" => { "options" => [] } } },
"type" => "en",
"encapsulation" => "Ethernet" },
@@ -118,28 +118,28 @@ describe Chef::Node::Attribute do
"selected" => { "autoselect" => { "options" => [] } } },
"type" => "en",
"encapsulation" => "Ethernet" },
- "fw0" => { "status" => "inactive",
- "flags" => %w{BROADCAST SIMPLEX MULTICAST},
- "number" => "0",
- "addresses" => { "00:23:32:ff:fe:b0:32:f2" => { "family" => "lladdr" } },
- "mtu" => "4078",
- "media" => { "supported" => { "autoselect" => { "options" => ["full-duplex"] } },
- "selected" => { "autoselect" => { "options" => ["full-duplex"] } } },
- "type" => "fw",
- "encapsulation" => "1394" },
- "en3" => { "status" => "active",
- "flags" => %w{UP BROADCAST SMART RUNNING SIMPLEX MULTICAST},
- "number" => "3",
- "addresses" => { "169.254.206.152" => { "broadcast" => "169.254.255.255",
- "netmask" => "255.255.0.0",
- "family" => "inet" },
- "00:1c:42:00:00:00" => { "family" => "lladdr" },
- "fe80::21c:42ff:fe00:0" => { "scope" => "Link", "prefixlen" => "64", "family" => "inet6" } },
- "mtu" => "1500",
- "media" => { "supported" => { "autoselect" => { "options" => [] } },
- "selected" => { "autoselect" => { "options" => [] } } },
- "type" => "en",
- "encapsulation" => "Ethernet" } } },
+ "fw0" => { "status" => "inactive",
+ "flags" => %w{BROADCAST SIMPLEX MULTICAST},
+ "number" => "0",
+ "addresses" => { "00:23:32:ff:fe:b0:32:f2" => { "family" => "lladdr" } },
+ "mtu" => "4078",
+ "media" => { "supported" => { "autoselect" => { "options" => ["full-duplex"] } },
+ "selected" => { "autoselect" => { "options" => ["full-duplex"] } } },
+ "type" => "fw",
+ "encapsulation" => "1394" },
+ "en3" => { "status" => "active",
+ "flags" => %w{UP BROADCAST SMART RUNNING SIMPLEX MULTICAST},
+ "number" => "3",
+ "addresses" => { "169.254.206.152" => { "broadcast" => "169.254.255.255",
+ "netmask" => "255.255.0.0",
+ "family" => "inet" },
+ "00:1c:42:00:00:00" => { "family" => "lladdr" },
+ "fe80::21c:42ff:fe00:0" => { "scope" => "Link", "prefixlen" => "64", "family" => "inet6" } },
+ "mtu" => "1500",
+ "media" => { "supported" => { "autoselect" => { "options" => [] } },
+ "selected" => { "autoselect" => { "options" => [] } } },
+ "type" => "en",
+ "encapsulation" => "Ethernet" } } },
"fqdn" => "latte.local",
"ohai_time" => 1249065590.90391,
"domain" => "local",
@@ -572,8 +572,8 @@ describe Chef::Node::Attribute do
before(:each) do
@attributes = Chef::Node::Attribute.new(
{
- "one" => { "two" => "three" },
- "hut" => { "two" => "three" },
+ "one" => { "two" => "three" },
+ "hut" => { "two" => "three" },
"place" => {},
},
{
@@ -621,11 +621,11 @@ describe Chef::Node::Attribute do
before(:each) do
@attributes = Chef::Node::Attribute.new(
{
- "one" => "two",
- "hut" => "three",
+ "one" => "two",
+ "hut" => "three",
},
{
- "one" => "four",
+ "one" => "four",
"snakes" => "on a plane",
},
{
@@ -659,11 +659,11 @@ describe Chef::Node::Attribute do
before do
@attributes = Chef::Node::Attribute.new(
{
- "one" => "two",
- "hut" => "three",
+ "one" => "two",
+ "hut" => "three",
},
{
- "one" => "four",
+ "one" => "four",
"snakes" => "on a plane",
},
{
@@ -695,11 +695,11 @@ describe Chef::Node::Attribute do
before do
@attributes = Chef::Node::Attribute.new(
{
- "one" => "two",
- "hut" => "three",
+ "one" => "two",
+ "hut" => "three",
},
{
- "one" => "four",
+ "one" => "four",
"snakes" => "on a plane",
},
{
@@ -731,11 +731,11 @@ describe Chef::Node::Attribute do
before do
@attributes = Chef::Node::Attribute.new(
{
- "one" => "two",
- "hut" => "three",
+ "one" => "two",
+ "hut" => "three",
},
{
- "one" => "four",
+ "one" => "four",
"snakes" => "on a plane",
},
{
@@ -775,11 +775,11 @@ describe Chef::Node::Attribute do
before do
@attributes = Chef::Node::Attribute.new(
{
- "one" => "two",
- "hut" => "three",
+ "one" => "two",
+ "hut" => "three",
},
{
- "one" => "four",
+ "one" => "four",
"snakes" => "on a plane",
},
{
@@ -809,11 +809,11 @@ describe Chef::Node::Attribute do
before do
@attributes = Chef::Node::Attribute.new(
{
- "one" => "two",
- "hut" => "three",
+ "one" => "two",
+ "hut" => "three",
},
{
- "one" => "four",
+ "one" => "four",
"snakes" => "on a plane",
},
{
@@ -866,11 +866,11 @@ describe Chef::Node::Attribute do
before do
@attributes = Chef::Node::Attribute.new(
{
- "one" => "two",
- "hut" => "three",
+ "one" => "two",
+ "hut" => "three",
},
{
- "one" => "four",
+ "one" => "four",
"snakes" => "on a plane",
},
{
@@ -911,11 +911,11 @@ describe Chef::Node::Attribute do
before do
@attributes = Chef::Node::Attribute.new(
{
- "one" => "two",
- "hut" => "three",
+ "one" => "two",
+ "hut" => "three",
},
{
- "one" => "four",
+ "one" => "four",
"snakes" => "on a plane",
},
{
@@ -952,11 +952,11 @@ describe Chef::Node::Attribute do
before do
@attributes = Chef::Node::Attribute.new(
{
- "one" => "two",
- "hut" => "three",
+ "one" => "two",
+ "hut" => "three",
},
{
- "one" => "four",
+ "one" => "four",
"snakes" => "on a plane",
},
{
@@ -988,11 +988,11 @@ describe Chef::Node::Attribute do
before do
@attributes = Chef::Node::Attribute.new(
{
- "one" => "two",
- "hut" => "three",
+ "one" => "two",
+ "hut" => "three",
},
{
- "one" => "four",
+ "one" => "four",
"snakes" => "on a plane",
},
{
@@ -1038,11 +1038,11 @@ describe Chef::Node::Attribute do
before do
@attributes = Chef::Node::Attribute.new(
{
- "one" => "two",
- "hut" => "three",
+ "one" => "two",
+ "hut" => "three",
},
{
- "one" => "four",
+ "one" => "four",
"snakes" => "on a plane",
},
{
diff --git a/spec/unit/node_spec.rb b/spec/unit/node_spec.rb
index 4c056ca349..37dc27ec0f 100644
--- a/spec/unit/node_spec.rb
+++ b/spec/unit/node_spec.rb
@@ -1477,7 +1477,7 @@ describe Chef::Node do
data = {
"automatic" => {
"filesystem" => {
- "/dev/disk0s2" => { "size" => "10mb" },
+ "/dev/disk0s2" => { "size" => "10mb" },
"map - autohome" => { "size" => "10mb" },
},
"network" => {
@@ -1550,7 +1550,7 @@ describe Chef::Node do
data = {
"automatic" => {
"filesystem" => {
- "/dev/disk0s2" => { "size" => "10mb" },
+ "/dev/disk0s2" => { "size" => "10mb" },
"map - autohome" => { "size" => "10mb" },
},
},
@@ -1578,7 +1578,7 @@ describe Chef::Node do
data = {
"automatic" => {
"filesystem" => {
- "/dev/disk0s2" => { "size" => "10mb" },
+ "/dev/disk0s2" => { "size" => "10mb" },
"map - autohome" => { "size" => "10mb" },
},
"network" => {
@@ -1616,7 +1616,7 @@ describe Chef::Node do
data = {
"automatic" => {
"filesystem" => {
- "/dev/disk0s2" => { "size" => "10mb" },
+ "/dev/disk0s2" => { "size" => "10mb" },
"map - autohome" => { "size" => "10mb" },
},
},
@@ -1626,7 +1626,7 @@ describe Chef::Node do
selected_data = {
"automatic" => {
"filesystem" => {
- "/dev/disk0s2" => { "size" => "10mb" },
+ "/dev/disk0s2" => { "size" => "10mb" },
"map - autohome" => { "size" => "10mb" },
},
},
diff --git a/spec/unit/provider/cron_spec.rb b/spec/unit/provider/cron_spec.rb
index 03e3599b35..98c525762b 100644
--- a/spec/unit/provider/cron_spec.rb
+++ b/spec/unit/provider/cron_spec.rb
@@ -51,7 +51,7 @@ describe Chef::Provider::Cron do
2 * 1 * * /bin/false
# Another comment
-CRONTAB
+ CRONTAB
end
it "should set cron_exists" do
@@ -80,7 +80,7 @@ CRONTAB
2 * 1 * * /bin/false
# Another comment
-CRONTAB
+ CRONTAB
cron = @provider.load_current_resource
expect(cron.mailto).to eq("foo@example.com")
expect(cron.shell).to eq("/bin/foosh")
@@ -97,7 +97,7 @@ CRONTAB
TEST=lol
FLAG=1
@reboot /bin/true
-CRONTAB
+ CRONTAB
cron = @provider.load_current_resource
expect(cron.mailto).to eq("warn@example.com")
@@ -112,7 +112,7 @@ CRONTAB
TEST=lol
ENVIRONMENT=production
@reboot /bin/true
-CRONTAB
+ CRONTAB
cron = @provider.load_current_resource
expect(cron.time).to eq(:reboot)
@@ -175,7 +175,7 @@ CRONTAB
* 5 * * * /bin/true
# Another comment
-CRONTAB
+ CRONTAB
end
it "should not set cron_exists or cron_empty" do
@@ -193,7 +193,7 @@ CRONTAB
allow(@provider).to receive(:read_crontab).and_return(<<~CRONTAB)
# Chef Name: foo[bar] (baz)
21 */4 * * * some_prog 1234567
-CRONTAB
+ CRONTAB
expect do
@provider.load_current_resource
end.not_to raise_error
@@ -211,7 +211,7 @@ CRONTAB
2 * 1 * * /bin/false
# Another comment
-CRONTAB
+ CRONTAB
end
it "should set cron_exists" do
@@ -245,7 +245,7 @@ CRONTAB
2 * 1 * * /bin/false
# Another comment
-CRONTAB
+ CRONTAB
cron = @provider.load_current_resource
expect(cron.mailto).to eq("foo@example.com")
expect(cron.shell).to eq("/bin/foosh")
@@ -267,7 +267,7 @@ CRONTAB
TEST=lol
FLAG=1
* 5 * * * /bin/true
-CRONTAB
+ CRONTAB
cron = @provider.load_current_resource
expect(cron.mailto).to eq("warn@example.com")
@@ -282,7 +282,7 @@ CRONTAB
TEST=lol
ENVIRONMENT=production
* 5 * * * /bin/true
-CRONTAB
+ CRONTAB
cron = @provider.load_current_resource
expect(cron.minute).to eq("*")
@@ -307,7 +307,7 @@ CRONTAB
2 * 1 * * /bin/false
# Another comment
-CRONTAB
+ CRONTAB
end
it "should set cron_exists" do
@@ -338,7 +338,7 @@ CRONTAB
0 2 * * * /some/other/command
# Chef Name: cronhole some stuff
-CRONTAB
+ CRONTAB
cron = @provider.load_current_resource
expect(@provider.cron_exists).to eq(true)
expect(cron.minute).to eq("*")
@@ -356,7 +356,7 @@ CRONTAB
# Chef Name: cronhole some stuff
#* 5 * 1 * /bin/true param1 param2
-CRONTAB
+ CRONTAB
cron = @provider.load_current_resource
expect(@provider.cron_exists).to eq(true)
expect(cron.minute).to eq("*")
@@ -378,7 +378,7 @@ CRONTAB
2 * 1 * * /bin/false
# Another comment
-CRONTAB
+ CRONTAB
cron = @provider.load_current_resource
expect(@provider.cron_exists).to eq(true)
expect(cron.minute).to eq("*")
@@ -700,7 +700,7 @@ CRONTAB
* 5 * * * /bin/true
# Another comment
-CRONTAB
+ CRONTAB
end
it "should not update the crontab" do
diff --git a/spec/unit/provider/execute_spec.rb b/spec/unit/provider/execute_spec.rb
index 9718a012da..11eb70e396 100644
--- a/spec/unit/provider/execute_spec.rb
+++ b/spec/unit/provider/execute_spec.rb
@@ -30,11 +30,11 @@ describe Chef::Provider::Execute do
let(:opts) do
{
- timeout: 3600,
- returns: 0,
- log_level: :info,
- default_env: false,
- log_tag: new_resource.to_s,
+ timeout: 3600,
+ returns: 0,
+ log_level: :info,
+ default_env: false,
+ log_tag: new_resource.to_s,
}
end
diff --git a/spec/unit/provider/git_spec.rb b/spec/unit/provider/git_spec.rb
index 4a6266b58a..b1409ee1f4 100644
--- a/spec/unit/provider/git_spec.rb
+++ b/spec/unit/provider/git_spec.rb
@@ -259,7 +259,7 @@ describe Chef::Provider::Git do
d7b9957f67236fa54e660cc3ab45ffecd6e0ba38\trefs/tags/0.7.8
b7d19519a1c15f1c1a324e2683bd728b6198ce5a\trefs/tags/0.7.8^{}
ebc1b392fe7e8f0fbabc305c299b4d365d2b4d9b\trefs/tags/chef-server-package
-SHAS
+ SHAS
@resource.revision ""
expect(@provider).to receive(:shell_out!).with(@git_ls_remote + "\"HEAD\"", { log_tag: "git[web2.0 app]" }).and_return(double("ShellOut result", stdout: @stdout))
expect(@provider.target_revision).to eql("28af684d8460ba4793eda3e7ac238c864a5d029a")
diff --git a/spec/unit/provider/group/dscl_spec.rb b/spec/unit/provider/group/dscl_spec.rb
index 8bd6485740..94322a89f9 100644
--- a/spec/unit/provider/group/dscl_spec.rb
+++ b/spec/unit/provider/group/dscl_spec.rb
@@ -120,7 +120,7 @@ describe Chef::Provider::Group::Dscl do
someprogram somethingElse:gid = (
500
)
- EOS
+ EOS
)
end
@@ -322,7 +322,7 @@ describe "Test DSCL loading" do
RecordName: com.apple.aj
RecordType: dsRecTypeStandard:Groups
GroupMembership: waka bar
-EOF
+ EOF
allow(@provider).to receive(:safe_dscl).with(*"read /Groups/aj".split(" ")).and_return(@output)
@current_resource = @provider.load_current_resource
diff --git a/spec/unit/provider/ifconfig/aix_spec.rb b/spec/unit/provider/ifconfig/aix_spec.rb
index 6acfddbedb..8baf3e437d 100644
--- a/spec/unit/provider/ifconfig/aix_spec.rb
+++ b/spec/unit/provider/ifconfig/aix_spec.rb
@@ -32,7 +32,7 @@ describe Chef::Provider::Ifconfig::Aix do
lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN>
inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
inet6 ::1%1/0
-IFCONFIG
+ IFCONFIG
end
before(:each) do
diff --git a/spec/unit/provider/ifconfig/debian_spec.rb b/spec/unit/provider/ifconfig/debian_spec.rb
index 93b0008e8b..308435dea2 100644
--- a/spec/unit/provider/ifconfig/debian_spec.rb
+++ b/spec/unit/provider/ifconfig/debian_spec.rb
@@ -123,7 +123,7 @@ describe Chef::Provider::Ifconfig::Debian do
a line
source #{tempdir_path}/*
another line
-EOF
+ EOF
end
before do
@@ -146,7 +146,7 @@ EOF
a line
another line
source #{tempdir_path}/*
-EOF
+ EOF
end
before do
diff --git a/spec/unit/provider/ifconfig_spec.rb b/spec/unit/provider/ifconfig_spec.rb
index 8c63a3e46e..5b1256300e 100644
--- a/spec/unit/provider/ifconfig_spec.rb
+++ b/spec/unit/provider/ifconfig_spec.rb
@@ -44,7 +44,7 @@ describe Chef::Provider::Ifconfig do
let(:net_tools_version) { StringIO.new <<~EOS }
net-tools 1.60
ifconfig 1.42 (2001-04-13)
-EOS
+ EOS
before do
ifconfig = double(stdout: "", exitstatus: 1)
diff --git a/spec/unit/provider/launchd_spec.rb b/spec/unit/provider/launchd_spec.rb
index 3031ea36c3..8b5edc68b5 100644
--- a/spec/unit/provider/launchd_spec.rb
+++ b/spec/unit/provider/launchd_spec.rb
@@ -49,7 +49,7 @@ describe Chef::Provider::Launchd do
\t<integer>300</integer>
</dict>
</plist>
-XML
+ XML
let(:test_plist_multiple_intervals) { String.new <<~XML }
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@@ -78,7 +78,7 @@ XML
\t<integer>300</integer>
</dict>
</plist>
-XML
+ XML
let(:test_hash) do
{
@@ -139,7 +139,7 @@ XML
it "should allow array of Hashes" do
allowed = (1..2).collect do |num|
{
- "Hour" => 10 + num,
+ "Hour" => 10 + num,
"Weekday" => num,
}
end
@@ -152,11 +152,11 @@ XML
it "should allow all StartCalendarInterval keys" do
allowed = {
- "Minute" => 1,
- "Hour" => 1,
- "Day" => 1,
+ "Minute" => 1,
+ "Hour" => 1,
+ "Day" => 1,
"Weekday" => 1,
- "Month" => 1,
+ "Month" => 1,
}
new_resource.program "/Library/scripts/call_mom.sh"
new_resource.time_out 300
diff --git a/spec/unit/provider/mount/aix_spec.rb b/spec/unit/provider/mount/aix_spec.rb
index b472e60710..e1cc140855 100644
--- a/spec/unit/provider/mount/aix_spec.rb
+++ b/spec/unit/provider/mount/aix_spec.rb
@@ -26,29 +26,29 @@ describe Chef::Provider::Mount::Aix do
node mounted mounted over vfs date options
-------- --------------- --------------- ------ ------------ ---------------
/dev/sdz1 /tmp/foo jfs2 Jul 17 13:22 rw,log=/dev/hd8
-MOUNT
+ MOUNT
@unmounted_output = <<~UNMOUNTED
node mounted mounted over vfs date options
-------- --------------- --------------- ------ ------------ ---------------
/dev/sdz2 / jfs2 Jul 17 13:22 rw,log=/dev/hd8
-UNMOUNTED
+ UNMOUNTED
@conflict_mounted_output = <<~MOUNT
node mounted mounted over vfs date options
-------- --------------- --------------- ------ ------------ ---------------
/dev/sdz3 /tmp/foo jfs2 Jul 17 13:22 rw,log=/dev/hd8
-MOUNT
+ MOUNT
@enabled_output = <<~ENABLED
#MountPoint:Device:Vfs:Nodename:Type:Size:Options:AutoMount:Acct
/tmp/foo:/dev/sdz1:jfs2::bootfs:10485760:rw:yes:no
-ENABLED
+ ENABLED
@test_wrong_output = <<~WRONG
#MountPoint:Device:Vfs:Nodename:Type:Size:Options:AutoMount:Acct
/tmp/foo::/dev/sdz1:jfs2:bootfs:10485760:rw:yes:no
-WRONG
+ WRONG
end
before(:each) do
@@ -248,7 +248,7 @@ WRONG
vfs = jfs2
mount = true
options = rw
-ETCFILESYSTEMS
+ ETCFILESYSTEMS
filesystems = StringIO.new
allow(::File).to receive(:open).with("/etc/filesystems", "w").and_yield(filesystems)
diff --git a/spec/unit/provider/package/ips_spec.rb b/spec/unit/provider/package/ips_spec.rb
index 70e1c3fe32..fc249729d1 100644
--- a/spec/unit/provider/package/ips_spec.rb
+++ b/spec/unit/provider/package/ips_spec.rb
@@ -40,7 +40,7 @@ describe Chef::Provider::Package::Ips do
installed on the system. Try specifying -r to query remotely:
crypto/gnupg
-PKG_STATUS
+ PKG_STATUS
OpenStruct.new(stdout: stdout, stdin: stdin, stderr: stderr, status: @status, exitstatus: 1)
end
@@ -56,7 +56,7 @@ PKG_STATUS
Packaging Date: April 1, 2012 05:55:52 PM
Size: 2.57 MB
FMRI: pkg://omnios/security/sudo@1.8.4.1,5.11-0.151002:20120401T175552Z
-PKG_STATUS
+ PKG_STATUS
stdin = StringIO.new
stderr = ""
OpenStruct.new(stdout: stdout, stdin: stdin, stderr: stderr, status: @status, exitstatus: 0)
@@ -106,7 +106,7 @@ PKG_STATUS
Packaging Date: October 19, 2011 09:14:50 AM
Size: 8.07 MB
FMRI: pkg://solaris/crypto/gnupg@2.0.17,5.11-0.175.0.0.0.2.537:20111019T091450Z
-INSTALLED
+ INSTALLED
expect(@provider).to receive(:shell_out_compacted).with("pkg", "info", @new_resource.package_name, timeout: 900).and_return(local)
expect(@provider).to receive(:shell_out_compacted!).with("pkg", "info", "-r", @new_resource.package_name, timeout: 900).and_return(remote_output)
@provider.load_current_resource
@@ -151,7 +151,7 @@ INSTALLED
Packaging Date: April 1, 2012 05:55:52 PM
Size: 2.57 MB
FMRI: pkg://omnios/security/sudo@1.8.4.1,5.11-0.151002:20120401T175552Z
-PKG_STATUS
+ PKG_STATUS
expect(@provider).to receive(:shell_out_compacted).with("pkg", "info", @new_resource.package_name, timeout: 900).and_return(local_output)
expect(@provider).to receive(:shell_out_compacted!).with("pkg", "info", "-r", @new_resource.package_name, timeout: 900).and_return(remote)
@provider.load_current_resource
@@ -175,7 +175,7 @@ PKG_STATUS
Packaging Date: October 19, 2011 09:14:50 AM
Size: 8.07 MB
FMRI: pkg://solaris/crypto/gnupg@2.0.17,5.11-0.175.0.0.0.2.537:20111019T091450Z
-INSTALLED
+ INSTALLED
remote = remote_output
remote.stdout = <<~REMOTE
Name: crypto/gnupg
@@ -191,7 +191,7 @@ INSTALLED
Packaging Date: October 19, 2011 09:14:50 AM
Size: 8.07 MB
FMRI: pkg://solaris/crypto/gnupg@2.0.18,5.11-0.175.0.0.0.2.537:20111019T091450Z
-REMOTE
+ REMOTE
expect(@provider).to receive(:shell_out_compacted).with("pkg", "info", @new_resource.package_name, timeout: 900).and_return(local)
expect(@provider).to receive(:shell_out_compacted!).with("pkg", "info", "-r", @new_resource.package_name, timeout: 900).and_return(remote)
diff --git a/spec/unit/provider/package/macports_spec.rb b/spec/unit/provider/package/macports_spec.rb
index 8b75e40d72..e2769fe71d 100644
--- a/spec/unit/provider/package/macports_spec.rb
+++ b/spec/unit/provider/package/macports_spec.rb
@@ -73,7 +73,7 @@ describe Chef::Provider::Package::Macports do
stdout = <<~EOF
The following ports are currently installed:
openssl @0.9.8k_0 (active)
-EOF
+ EOF
status = double(stdout: stdout, exitstatus: 0)
expect(@provider).to receive(:shell_out_compacted).and_return(status)
diff --git a/spec/unit/provider/package/pacman_spec.rb b/spec/unit/provider/package/pacman_spec.rb
index 10bb3492b2..c869992a0f 100644
--- a/spec/unit/provider/package/pacman_spec.rb
+++ b/spec/unit/provider/package/pacman_spec.rb
@@ -34,7 +34,7 @@ describe Chef::Provider::Package::Pacman do
@stdin = StringIO.new
@stdout = StringIO.new(<<~ERR)
error: package "nano" not found
-ERR
+ ERR
@stderr = StringIO.new
@pid = 2342
end
@@ -86,7 +86,7 @@ ERR
Install Reason : Explicitly installed
Install Script : Yes
Description : Pico editor clone with enhancements
-PACMAN
+ PACMAN
status = double(stdout: stdout, exitstatus: 0)
allow(@provider).to receive(:shell_out_compacted).and_return(status)
@@ -118,7 +118,7 @@ PACMAN
[community]
Include = /etc/pacman.d/mirrorlist
-PACMAN_CONF
+ PACMAN_CONF
status = double(stdout: "customrepo nano 1.2.3-4", exitstatus: 0)
allow(::File).to receive(:exist?).with("/etc/pacman.conf").and_return(true)
diff --git a/spec/unit/provider/package/paludis_spec.rb b/spec/unit/provider/package/paludis_spec.rb
index 10c0d0f7e8..678e2e6301 100644
--- a/spec/unit/provider/package/paludis_spec.rb
+++ b/spec/unit/provider/package/paludis_spec.rb
@@ -40,7 +40,7 @@ describe Chef::Provider::Package::Paludis do
user/ntp 0 accounts
user/ntp 0 installed-accounts
net/ntp 4.2.6_p5-r1 installed
-PKG_STATUS
+ PKG_STATUS
@pid = 12345
@shell_out = OpenStruct.new(stdout: @stdout, stdin: @stdin, stderr: @stderr, status: @status, exitstatus: 0)
end
@@ -71,7 +71,7 @@ PKG_STATUS
user/ntp 0 accounts
user/ntp 0 installed-accounts
net/ntp 4.2.6_p5-r1 installed
-INSTALLED
+ INSTALLED
expect(@provider).to receive(:shell_out_compacted!).and_return(@shell_out)
@provider.load_current_resource
expect(@current_resource.version).to eq("4.2.6_p5-r1")
@@ -100,7 +100,7 @@ INSTALLED
@stdout.replace(<<~PKG_STATUS)
sys-process/lsof 4.87 arbor
sys-process/lsof 4.87 x86_64
-PKG_STATUS
+ PKG_STATUS
expect(@provider).to receive(:shell_out_compacted!).with("cave", "-L", "warning", "resolve", "-x", "=sys-process/lsof-4.87", { timeout: @new_resource.timeout || 900 })
@provider.install_package("sys-process/lsof", "4.87")
end
@@ -109,7 +109,7 @@ PKG_STATUS
@stdout.replace(<<~PKG_STATUS)
sys-process/lsof 4.87 arbor
sys-process/lsof 4.87 x86_64
-PKG_STATUS
+ PKG_STATUS
expect(@provider).to receive(:shell_out_compacted!).and_return(@shell_out)
@provider.load_current_resource
expect(@current_resource.version).to be_nil
diff --git a/spec/unit/provider/package/portage_spec.rb b/spec/unit/provider/package/portage_spec.rb
index e1036bea74..4bfef864ff 100644
--- a/spec/unit/provider/package/portage_spec.rb
+++ b/spec/unit/provider/package/portage_spec.rb
@@ -138,7 +138,7 @@ describe Chef::Provider::Package::Portage, "load_current_resource" do
* dev-python/sphinx
Please use a more specific atom.
-EOF
+ EOF
status = double(stdout: "", stderr: stderr_output, exitstatus: 1)
@provider = Chef::Provider::Package::Portage.new(@new_resource_without_category, @run_context)
expect(@provider).to receive(:shell_out_compacted).and_return(status)
diff --git a/spec/unit/provider/package/solaris_spec.rb b/spec/unit/provider/package/solaris_spec.rb
index 2aa37fe8b3..5fc2d89a81 100644
--- a/spec/unit/provider/package/solaris_spec.rb
+++ b/spec/unit/provider/package/solaris_spec.rb
@@ -44,7 +44,7 @@ describe Chef::Provider::Package::Solaris do
PSTAMP: sfw10-patch20070430084444
INSTDATE: Nov 04 2009 01:02
HOTLINE: Please contact your local service provider
-PKGINFO
+ PKGINFO
@status = double("Status", stdout: "", exitstatus: 0)
end
diff --git a/spec/unit/provider/service/arch_service_spec.rb b/spec/unit/provider/service/arch_service_spec.rb
index a7a9602750..faec7ff645 100644
--- a/spec/unit/provider/service/arch_service_spec.rb
+++ b/spec/unit/provider/service/arch_service_spec.rb
@@ -121,7 +121,7 @@ describe Chef::Provider::Service::Arch, "load_current_resource" do
aj 7842 5057 0 21:26 pts/2 00:00:06 vi init.rb
aj 7903 5016 0 21:26 pts/5 00:00:00 /bin/bash
aj 8119 6041 0 21:34 pts/3 00:00:03 vi init_service_spec.rb
-DEFAULT_PS
+ DEFAULT_PS
@status = double("Status", exitstatus: 0, stdout: @stdout)
allow(@provider).to receive(:shell_out!).and_return(@status)
@@ -132,7 +132,7 @@ DEFAULT_PS
@stdout = StringIO.new(<<~RUNNING_PS)
aj 7842 5057 0 21:26 pts/2 00:00:06 chef
aj 7842 5057 0 21:26 pts/2 00:00:06 poos
-RUNNING_PS
+ RUNNING_PS
allow(@status).to receive(:stdout).and_return(@stdout)
@provider.load_current_resource
expect(@provider.current_resource.running).to be_truthy
diff --git a/spec/unit/provider/service/freebsd_service_spec.rb b/spec/unit/provider/service/freebsd_service_spec.rb
index b4330b976c..d33b97d63d 100644
--- a/spec/unit/provider/service/freebsd_service_spec.rb
+++ b/spec/unit/provider/service/freebsd_service_spec.rb
@@ -142,7 +142,7 @@ describe Chef::Provider::Service::Freebsd do
413 ?? Ss 0:02.51 /usr/sbin/syslogd -s
539 ?? Is 0:00.14 /usr/sbin/sshd
545 ?? Ss 0:17.53 sendmail: accepting connections (sendmail)
-PS_SAMPLE
+ PS_SAMPLE
end
let(:status) { double(stdout: stdout, exitstatus: 0) }
@@ -344,7 +344,7 @@ PS_SAMPLE
StringIO.new(<<~EOF)
name="#{new_resource.service_name}"
rcvar=`set_rcvar`
-EOF
+ EOF
end
it "should not raise an exception if the rcscript have a name variable" do
@@ -365,7 +365,7 @@ EOF
let(:rcscript) do
StringIO.new <<~EOF
rcvar=`set_rcvar`
-EOF
+ EOF
end
before do
@@ -380,7 +380,7 @@ EOF
#
# #{new_resource.service_name}_enable="YES"
# (default: "")
-EOF
+ EOF
end
it "should get the service name from rcvar if the rcscript does not have a name variable" do
@@ -397,7 +397,7 @@ EOF
rcvar_stdout = <<~EOF
# service_with_noname
#
-EOF
+ EOF
end
it "should return nil" do
diff --git a/spec/unit/provider/service/init_service_spec.rb b/spec/unit/provider/service/init_service_spec.rb
index 07668ef8ab..38e9ad37de 100644
--- a/spec/unit/provider/service/init_service_spec.rb
+++ b/spec/unit/provider/service/init_service_spec.rb
@@ -36,7 +36,7 @@ describe Chef::Provider::Service::Init, "load_current_resource" do
aj 7842 5057 0 21:26 pts/2 00:00:06 vi init.rb
aj 7903 5016 0 21:26 pts/5 00:00:00 /bin/bash
aj 8119 6041 0 21:34 pts/3 00:00:03 vi init_service_spec.rb
-PS
+ PS
@status = double("Status", exitstatus: 0, stdout: @stdout)
allow(@provider).to receive(:shell_out!).and_return(@status)
end
@@ -136,7 +136,7 @@ PS
@stdout = StringIO.new(<<~RUNNING_PS)
aj 7842 5057 0 21:26 pts/2 00:00:06 chef
aj 7842 5057 0 21:26 pts/2 00:00:06 poos
-RUNNING_PS
+ RUNNING_PS
allow(@status).to receive(:stdout).and_return(@stdout)
@provider.load_current_resource
expect(@current_resource.running).to be_truthy
diff --git a/spec/unit/provider/service/invokercd_service_spec.rb b/spec/unit/provider/service/invokercd_service_spec.rb
index 822062a82b..fb1a29fa43 100644
--- a/spec/unit/provider/service/invokercd_service_spec.rb
+++ b/spec/unit/provider/service/invokercd_service_spec.rb
@@ -36,7 +36,7 @@ describe Chef::Provider::Service::Invokercd, "load_current_resource" do
aj 7842 5057 0 21:26 pts/2 00:00:06 vi init.rb
aj 7903 5016 0 21:26 pts/5 00:00:00 /bin/bash
aj 8119 6041 0 21:34 pts/3 00:00:03 vi init_service_spec.rb
-PS
+ PS
@status = double("Status", exitstatus: 0, stdout: @stdout)
allow(@provider).to receive(:shell_out!).and_return(@status)
end
@@ -121,7 +121,7 @@ PS
@stdout = StringIO.new(<<~RUNNING_PS)
aj 7842 5057 0 21:26 pts/2 00:00:06 chef
aj 7842 5057 0 21:26 pts/2 00:00:06 poos
-RUNNING_PS
+ RUNNING_PS
@status = double("Status", exitstatus: 0, stdout: @stdout)
expect(@provider).to receive(:shell_out!).and_return(@status)
@provider.load_current_resource
diff --git a/spec/unit/provider/service/macosx_spec.rb b/spec/unit/provider/service/macosx_spec.rb
index 9864fb0185..e11cf6154e 100644
--- a/spec/unit/provider/service/macosx_spec.rb
+++ b/spec/unit/provider/service/macosx_spec.rb
@@ -57,7 +57,7 @@ describe Chef::Provider::Service::Macosx do
<string>io.redis.redis-server</string>
</dict>
</plist>
-XML
+ XML
%w{Daemon Agent}.each do |service_type|
["redis-server", "io.redis.redis-server"].each do |service_name|
@@ -150,7 +150,7 @@ XML
"-f";
);
};
-SVC_LIST
+ SVC_LIST
before do
provider.load_current_resource
@@ -188,7 +188,7 @@ SVC_LIST
"-f";
);
};
-SVC_LIST
+ SVC_LIST
before do
provider.load_current_resource
@@ -206,7 +206,7 @@ SVC_LIST
context "when launchctl doesn't return service entry at all" do
let(:launchctl_stdout) { StringIO.new <<~SVC_LIST }
Could not find service "io.redis.redis-server" in domain for system
-SVC_LIST
+ SVC_LIST
it "sets service running state to false" do
provider.load_current_resource
diff --git a/spec/unit/provider/service/simple_service_spec.rb b/spec/unit/provider/service/simple_service_spec.rb
index 4ea1d520b7..2a0ebea1dc 100644
--- a/spec/unit/provider/service/simple_service_spec.rb
+++ b/spec/unit/provider/service/simple_service_spec.rb
@@ -35,7 +35,7 @@ describe Chef::Provider::Service::Simple, "load_current_resource" do
aj 7842 5057 0 21:26 pts/2 00:00:06 vi init.rb
aj 7903 5016 0 21:26 pts/5 00:00:00 /bin/bash
aj 8119 6041 0 21:34 pts/3 00:00:03 vi simple_service_spec.rb
-NOMOCKINGSTRINGSPLZ
+ NOMOCKINGSTRINGSPLZ
@status = double("Status", exitstatus: 0, stdout: @stdout)
allow(@provider).to receive(:shell_out!).and_return(@status)
end
@@ -78,7 +78,7 @@ NOMOCKINGSTRINGSPLZ
@stdout = StringIO.new(<<~NOMOCKINGSTRINGSPLZ)
aj 7842 5057 0 21:26 pts/2 00:00:06 chef
aj 7842 5057 0 21:26 pts/2 00:00:06 poos
-NOMOCKINGSTRINGSPLZ
+ NOMOCKINGSTRINGSPLZ
@status = double("Status", exitstatus: 0, stdout: @stdout)
allow(@provider).to receive(:shell_out!).and_return(@status)
@provider.load_current_resource
diff --git a/spec/unit/provider/template/content_spec.rb b/spec/unit/provider/template/content_spec.rb
index 67d4eba138..572cf23181 100644
--- a/spec/unit/provider/template/content_spec.rb
+++ b/spec/unit/provider/template/content_spec.rb
@@ -162,7 +162,7 @@ describe Chef::Provider::Template::Content do
2
helpers.erb
#{CHEF_SPEC_DATA}/cookbooks/openldap/templates/default/helpers.erb
-EOF
+ EOF
end
end
diff --git a/spec/unit/provider_resolver_spec.rb b/spec/unit/provider_resolver_spec.rb
index 5066135b90..9b3839163d 100644
--- a/spec/unit/provider_resolver_spec.rb
+++ b/spec/unit/provider_resolver_spec.rb
@@ -553,61 +553,61 @@ describe Chef::ProviderResolver do
PROVIDERS =
{
- aix_user: [ Chef::Resource::User::AixUser, Chef::Provider::User::Aix ],
- apt_package: [ Chef::Resource::AptPackage, Chef::Provider::Package::Apt ],
- bash: [ Chef::Resource::Bash, Chef::Provider::Script ],
- bff_package: [ Chef::Resource::BffPackage, Chef::Provider::Package::Bff ],
- breakpoint: [ Chef::Resource::Breakpoint, Chef::Resource::Breakpoint.action_class ],
- chef_gem: [ Chef::Resource::ChefGem, Chef::Provider::Package::Rubygems ],
- cookbook_file: [ Chef::Resource::CookbookFile, Chef::Provider::CookbookFile ],
- csh: [ Chef::Resource::Csh, Chef::Provider::Script ],
- directory: [ Chef::Resource::Directory, Chef::Provider::Directory ],
- dpkg_package: [ Chef::Resource::DpkgPackage, Chef::Provider::Package::Dpkg ],
- dsc_script: [ Chef::Resource::DscScript, Chef::Provider::DscScript ],
- dscl_user: [ Chef::Resource::User::DsclUser, Chef::Provider::User::Dscl ],
- execute: [ Chef::Resource::Execute, Chef::Provider::Execute ],
- file: [ Chef::Resource::File, Chef::Provider::File ],
- gem_package: [ Chef::Resource::GemPackage, Chef::Provider::Package::Rubygems ],
- git: [ Chef::Resource::Git, Chef::Provider::Git ],
- group: [ Chef::Resource::Group, Chef::Provider::Group::Gpasswd ],
- homebrew_package: [ Chef::Resource::HomebrewPackage, Chef::Provider::Package::Homebrew ],
- http_request: [ Chef::Resource::HttpRequest, Chef::Provider::HttpRequest ],
- ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ],
- ips_package: [ Chef::Resource::IpsPackage, Chef::Provider::Package::Ips ],
- link: [ Chef::Resource::Link, Chef::Provider::Link ],
- linux_user: [ Chef::Resource::User::LinuxUser, Chef::Provider::User::Linux ],
- log: [ Chef::Resource::Log, Chef::Provider::Log::ChefLog ],
- macports_package: [ Chef::Resource::MacportsPackage, Chef::Provider::Package::Macports ],
- mdadm: [ Chef::Resource::Mdadm, Chef::Provider::Mdadm ],
- mount: [ Chef::Resource::Mount, Chef::Provider::Mount::Mount ],
- pacman_package: [ Chef::Resource::PacmanPackage, Chef::Provider::Package::Pacman ],
- paludis_package: [ Chef::Resource::PaludisPackage, Chef::Provider::Package::Paludis ],
- perl: [ Chef::Resource::Perl, Chef::Provider::Script ],
- portage_package: [ Chef::Resource::PortagePackage, Chef::Provider::Package::Portage ],
- pw_user: [ Chef::Resource::User::PwUser, Chef::Provider::User::Pw ],
- python: [ Chef::Resource::Python, Chef::Provider::Script ],
- remote_directory: [ Chef::Resource::RemoteDirectory, Chef::Provider::RemoteDirectory ],
- route: [ Chef::Resource::Route, Chef::Provider::Route ],
- rpm_package: [ Chef::Resource::Package::RpmPackage, Chef::Provider::Package::Rpm ],
- ruby_block: [ Chef::Resource::RubyBlock, Chef::Provider::RubyBlock ],
- ruby: [ Chef::Resource::Ruby, Chef::Provider::Script ],
- script: [ Chef::Resource::Script, Chef::Provider::Script ],
- smartos_package: [ Chef::Resource::SmartosPackage, Chef::Provider::Package::SmartOS ],
- snap_package: [ Chef::Resource::SnapPackage, Chef::Provider::Package::Snap ],
- solaris_package: [ Chef::Resource::SolarisPackage, Chef::Provider::Package::Solaris ],
- solaris_user: [ Chef::Resource::User::SolarisUser, Chef::Provider::User::Solaris ],
- subversion: [ Chef::Resource::Subversion, Chef::Provider::Subversion ],
- template: [ Chef::Resource::Template, Chef::Provider::Template ],
+ aix_user: [ Chef::Resource::User::AixUser, Chef::Provider::User::Aix ],
+ apt_package: [ Chef::Resource::AptPackage, Chef::Provider::Package::Apt ],
+ bash: [ Chef::Resource::Bash, Chef::Provider::Script ],
+ bff_package: [ Chef::Resource::BffPackage, Chef::Provider::Package::Bff ],
+ breakpoint: [ Chef::Resource::Breakpoint, Chef::Resource::Breakpoint.action_class ],
+ chef_gem: [ Chef::Resource::ChefGem, Chef::Provider::Package::Rubygems ],
+ cookbook_file: [ Chef::Resource::CookbookFile, Chef::Provider::CookbookFile ],
+ csh: [ Chef::Resource::Csh, Chef::Provider::Script ],
+ directory: [ Chef::Resource::Directory, Chef::Provider::Directory ],
+ dpkg_package: [ Chef::Resource::DpkgPackage, Chef::Provider::Package::Dpkg ],
+ dsc_script: [ Chef::Resource::DscScript, Chef::Provider::DscScript ],
+ dscl_user: [ Chef::Resource::User::DsclUser, Chef::Provider::User::Dscl ],
+ execute: [ Chef::Resource::Execute, Chef::Provider::Execute ],
+ file: [ Chef::Resource::File, Chef::Provider::File ],
+ gem_package: [ Chef::Resource::GemPackage, Chef::Provider::Package::Rubygems ],
+ git: [ Chef::Resource::Git, Chef::Provider::Git ],
+ group: [ Chef::Resource::Group, Chef::Provider::Group::Gpasswd ],
+ homebrew_package: [ Chef::Resource::HomebrewPackage, Chef::Provider::Package::Homebrew ],
+ http_request: [ Chef::Resource::HttpRequest, Chef::Provider::HttpRequest ],
+ ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ],
+ ips_package: [ Chef::Resource::IpsPackage, Chef::Provider::Package::Ips ],
+ link: [ Chef::Resource::Link, Chef::Provider::Link ],
+ linux_user: [ Chef::Resource::User::LinuxUser, Chef::Provider::User::Linux ],
+ log: [ Chef::Resource::Log, Chef::Provider::Log::ChefLog ],
+ macports_package: [ Chef::Resource::MacportsPackage, Chef::Provider::Package::Macports ],
+ mdadm: [ Chef::Resource::Mdadm, Chef::Provider::Mdadm ],
+ mount: [ Chef::Resource::Mount, Chef::Provider::Mount::Mount ],
+ pacman_package: [ Chef::Resource::PacmanPackage, Chef::Provider::Package::Pacman ],
+ paludis_package: [ Chef::Resource::PaludisPackage, Chef::Provider::Package::Paludis ],
+ perl: [ Chef::Resource::Perl, Chef::Provider::Script ],
+ portage_package: [ Chef::Resource::PortagePackage, Chef::Provider::Package::Portage ],
+ pw_user: [ Chef::Resource::User::PwUser, Chef::Provider::User::Pw ],
+ python: [ Chef::Resource::Python, Chef::Provider::Script ],
+ remote_directory: [ Chef::Resource::RemoteDirectory, Chef::Provider::RemoteDirectory ],
+ route: [ Chef::Resource::Route, Chef::Provider::Route ],
+ rpm_package: [ Chef::Resource::Package::RpmPackage, Chef::Provider::Package::Rpm ],
+ ruby_block: [ Chef::Resource::RubyBlock, Chef::Provider::RubyBlock ],
+ ruby: [ Chef::Resource::Ruby, Chef::Provider::Script ],
+ script: [ Chef::Resource::Script, Chef::Provider::Script ],
+ smartos_package: [ Chef::Resource::SmartosPackage, Chef::Provider::Package::SmartOS ],
+ snap_package: [ Chef::Resource::SnapPackage, Chef::Provider::Package::Snap ],
+ solaris_package: [ Chef::Resource::SolarisPackage, Chef::Provider::Package::Solaris ],
+ solaris_user: [ Chef::Resource::User::SolarisUser, Chef::Provider::User::Solaris ],
+ subversion: [ Chef::Resource::Subversion, Chef::Provider::Subversion ],
+ template: [ Chef::Resource::Template, Chef::Provider::Template ],
whyrun_safe_ruby_block: [ Chef::Resource::WhyrunSafeRubyBlock, Chef::Provider::WhyrunSafeRubyBlock ],
- windows_package: [ Chef::Resource::WindowsPackage, Chef::Provider::Package::Windows ],
- windows_service: [ Chef::Resource::WindowsService, Chef::Provider::Service::Windows ],
- windows_user: [ Chef::Resource::User::WindowsUser, Chef::Provider::User::Windows ],
- yum_package: [ Chef::Resource::YumPackage, Chef::Provider::Package::Yum ],
+ windows_package: [ Chef::Resource::WindowsPackage, Chef::Provider::Package::Windows ],
+ windows_service: [ Chef::Resource::WindowsService, Chef::Provider::Service::Windows ],
+ windows_user: [ Chef::Resource::User::WindowsUser, Chef::Provider::User::Windows ],
+ yum_package: [ Chef::Resource::YumPackage, Chef::Provider::Package::Yum ],
"linux" => {
"debian" => {
ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig::Debian ],
- package: [ Chef::Resource::AptPackage, Chef::Provider::Package::Apt ],
+ package: [ Chef::Resource::AptPackage, Chef::Provider::Package::Apt ],
# service: [ Chef::Resource::DebianService, Chef::Provider::Service::Debian ],
"debian" => {
@@ -673,7 +673,7 @@ describe Chef::ProviderResolver do
"opensuse" => {
# service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ],
package: [ Chef::Resource::ZypperPackage, Chef::Provider::Package::Zypper ],
- group: [ Chef::Resource::Group, Chef::Provider::Group::Usermod ],
+ group: [ Chef::Resource::Group, Chef::Provider::Group::Usermod ],
"12.3" => {
},
"12.2" => {
@@ -684,7 +684,7 @@ describe Chef::ProviderResolver do
"gentoo" => {
# TODO should be Chef::Resource::PortagePackage
- package: [ Chef::Resource::Package, Chef::Provider::Package::Portage ],
+ package: [ Chef::Resource::Package, Chef::Provider::Package::Portage ],
portage_package: [ Chef::Resource::PortagePackage, Chef::Provider::Package::Portage ],
# service: [ Chef::Resource::GentooService, Chef::Provider::Service::Gentoo ],
@@ -696,21 +696,21 @@ describe Chef::ProviderResolver do
"rhel" => {
# service: [ Chef::Resource::SystemdService, Chef::Provider::Service::Systemd ],
- package: [ Chef::Resource::DnfPackage, Chef::Provider::Package::Dnf ],
+ package: [ Chef::Resource::DnfPackage, Chef::Provider::Package::Dnf ],
ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig::Redhat ],
%w{amazon xcp xenserver ibm_powerkvm cloudlinux parallels} => {
"3.1.4" => {
- package: [ Chef::Resource::YumPackage, Chef::Provider::Package::Yum ],
+ package: [ Chef::Resource::YumPackage, Chef::Provider::Package::Yum ],
# service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ],
},
},
%w{redhat centos scientific oracle} => {
"7.0" => {
- package: [ Chef::Resource::YumPackage, Chef::Provider::Package::Yum ],
+ package: [ Chef::Resource::YumPackage, Chef::Provider::Package::Yum ],
},
"6.0" => {
- package: [ Chef::Resource::YumPackage, Chef::Provider::Package::Yum ],
+ package: [ Chef::Resource::YumPackage, Chef::Provider::Package::Yum ],
# service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ],
},
},
@@ -728,7 +728,7 @@ describe Chef::ProviderResolver do
"freebsd" => {
"freebsd" => {
group: [ Chef::Resource::Group, Chef::Provider::Group::Pw ],
- user: [ Chef::Resource::User::PwUser, Chef::Provider::User::Pw ],
+ user: [ Chef::Resource::User::PwUser, Chef::Provider::User::Pw ],
"freebsd" => {
"10.3" => {
@@ -739,10 +739,10 @@ describe Chef::ProviderResolver do
"darwin" => {
%w{mac_os_x mac_os_x_server} => {
- group: [ Chef::Resource::Group, Chef::Provider::Group::Dscl ],
+ group: [ Chef::Resource::Group, Chef::Provider::Group::Dscl ],
package: [ Chef::Resource::HomebrewPackage, Chef::Provider::Package::Homebrew ],
osx_profile: [ Chef::Resource::OsxProfile, Chef::Provider::OsxProfile],
- user: [ Chef::Resource::User::DsclUser, Chef::Provider::User::Dscl ],
+ user: [ Chef::Resource::User::DsclUser, Chef::Provider::User::Dscl ],
"mac_os_x" => {
"10.9.2" => {
@@ -752,17 +752,17 @@ describe Chef::ProviderResolver do
},
"windows" => {
- batch: [ Chef::Resource::Batch, Chef::Provider::Batch ],
- dsc_script: [ Chef::Resource::DscScript, Chef::Provider::DscScript ],
- windows_env: [ Chef::Resource::WindowsEnv, Chef::Provider::WindowsEnv ],
- group: [ Chef::Resource::Group, Chef::Provider::Group::Windows ],
- mount: [ Chef::Resource::Mount, Chef::Provider::Mount::Windows ],
- package: [ Chef::Resource::WindowsPackage, Chef::Provider::Package::Windows ],
+ batch: [ Chef::Resource::Batch, Chef::Provider::Batch ],
+ dsc_script: [ Chef::Resource::DscScript, Chef::Provider::DscScript ],
+ windows_env: [ Chef::Resource::WindowsEnv, Chef::Provider::WindowsEnv ],
+ group: [ Chef::Resource::Group, Chef::Provider::Group::Windows ],
+ mount: [ Chef::Resource::Mount, Chef::Provider::Mount::Windows ],
+ package: [ Chef::Resource::WindowsPackage, Chef::Provider::Package::Windows ],
powershell_script: [ Chef::Resource::PowershellScript, Chef::Provider::PowershellScript ],
- service: [ Chef::Resource::WindowsService, Chef::Provider::Service::Windows ],
- user: [ Chef::Resource::User::WindowsUser, Chef::Provider::User::Windows ],
- windows_package: [ Chef::Resource::WindowsPackage, Chef::Provider::Package::Windows ],
- windows_service: [ Chef::Resource::WindowsService, Chef::Provider::Service::Windows ],
+ service: [ Chef::Resource::WindowsService, Chef::Provider::Service::Windows ],
+ user: [ Chef::Resource::User::WindowsUser, Chef::Provider::User::Windows ],
+ windows_package: [ Chef::Resource::WindowsPackage, Chef::Provider::Package::Windows ],
+ windows_service: [ Chef::Resource::WindowsService, Chef::Provider::Service::Windows ],
"windows" => {
%w{mswin mingw32 windows} => {
@@ -823,15 +823,15 @@ describe Chef::ProviderResolver do
},
"solaris2" => {
- group: [ Chef::Resource::Group, Chef::Provider::Group::Usermod ],
- ips_package: [ Chef::Resource::IpsPackage, Chef::Provider::Package::Ips ],
- package: [ Chef::Resource::SolarisPackage, Chef::Provider::Package::Solaris ],
- mount: [ Chef::Resource::Mount, Chef::Provider::Mount::Solaris ],
+ group: [ Chef::Resource::Group, Chef::Provider::Group::Usermod ],
+ ips_package: [ Chef::Resource::IpsPackage, Chef::Provider::Package::Ips ],
+ package: [ Chef::Resource::SolarisPackage, Chef::Provider::Package::Solaris ],
+ mount: [ Chef::Resource::Mount, Chef::Provider::Mount::Solaris ],
solaris_package: [ Chef::Resource::SolarisPackage, Chef::Provider::Package::Solaris ],
"smartos" => {
smartos_package: [ Chef::Resource::SmartosPackage, Chef::Provider::Package::SmartOS ],
- package: [ Chef::Resource::SmartosPackage, Chef::Provider::Package::SmartOS ],
+ package: [ Chef::Resource::SmartosPackage, Chef::Provider::Package::SmartOS ],
"smartos" => {
"3.1.4" => {
diff --git a/spec/unit/recipe_spec.rb b/spec/unit/recipe_spec.rb
index 3b16edaa4a..2d5bb81c95 100644
--- a/spec/unit/recipe_spec.rb
+++ b/spec/unit/recipe_spec.rb
@@ -390,7 +390,7 @@ describe Chef::Recipe do
zen_master "gnome" do
peace = true
end
- CODE
+ CODE
expect { recipe.instance_eval(code) }.not_to raise_error
expect(recipe.resources(zen_master: "gnome").name).to eql("gnome")
end
diff --git a/spec/unit/resource/chocolatey_config_spec.rb b/spec/unit/resource/chocolatey_config_spec.rb
index b6f36026bd..f768197671 100644
--- a/spec/unit/resource/chocolatey_config_spec.rb
+++ b/spec/unit/resource/chocolatey_config_spec.rb
@@ -35,7 +35,7 @@ describe Chef::Resource::ChocolateyConfig do
</features>
<apiKeys />
</chocolatey>
-CONFIG
+ CONFIG
end
# we save off the ENV and set ALLUSERSPROFILE so these specs will work on *nix and non-C drive Windows installs
diff --git a/spec/unit/resource/chocolatey_source_spec.rb b/spec/unit/resource/chocolatey_source_spec.rb
index bbead24e79..1463a448de 100644
--- a/spec/unit/resource/chocolatey_source_spec.rb
+++ b/spec/unit/resource/chocolatey_source_spec.rb
@@ -35,7 +35,7 @@ describe Chef::Resource::ChocolateySource do
</features>
<apiKeys />
</chocolatey>
-CONFIG
+ CONFIG
end
# we save off the ENV and set ALLUSERSPROFILE so these specs will work on *nix and non-C drive Windows installs
diff --git a/spec/unit/resource/rhsm_subscription_spec.rb b/spec/unit/resource/rhsm_subscription_spec.rb
index 6de65a427f..00d61c9ff5 100644
--- a/spec/unit/resource/rhsm_subscription_spec.rb
+++ b/spec/unit/resource/rhsm_subscription_spec.rb
@@ -74,7 +74,7 @@ describe Chef::Resource::RhsmSubscription do
Pool ID: pool2
Serial: serial2
Key2: value2
-EOL
+ EOL
end
it "parses the output correctly" do
diff --git a/spec/unit/resource_spec.rb b/spec/unit/resource_spec.rb
index 7793b82034..3bd13b4c97 100644
--- a/spec/unit/resource_spec.rb
+++ b/spec/unit/resource_spec.rb
@@ -410,7 +410,7 @@ describe Chef::Resource do
resource "foo" do
foo foo
end
- EOH
+ EOH
end
end
diff --git a/spec/unit/role_spec.rb b/spec/unit/role_spec.rb
index 57f1d5c6ba..0e12f65e58 100644
--- a/spec/unit/role_spec.rb
+++ b/spec/unit/role_spec.rb
@@ -248,7 +248,7 @@ describe Chef::Role do
ROLE_DSL = <<~EOR.freeze
name "ceiling_cat"
description "like Aliens, but furry"
-EOR
+ EOR
describe "when loading from disk" do
before do
diff --git a/spec/unit/util/dsc/lcm_output_parser_spec.rb b/spec/unit/util/dsc/lcm_output_parser_spec.rb
index 32e5c0e07f..6ced178bf1 100644
--- a/spec/unit/util/dsc/lcm_output_parser_spec.rb
+++ b/spec/unit/util/dsc/lcm_output_parser_spec.rb
@@ -52,7 +52,7 @@ describe Chef::Util::DSC::LocalConfigurationManager::Parser do
logtype: [machinename]: LCM: [ Start Resource ] [name]
logtype: [machinename]: LCM: [ End Resource ] [name]
logtype: [machinename]: LCM: [ End Set ]
-EOF
+ EOF
resources = Chef::Util::DSC::LocalConfigurationManager::Parser.parse(str, false)
expect(resources.length).to eq(1)
expect(resources[0].name).to eq("[name]")
@@ -66,7 +66,7 @@ EOF
logtype: [machinename]: LCM: [ End Set ] [name]
logtype: [machinename]: LCM: [ End Resource ] [name]
logtype: [machinename]: LCM: [ End Set ]
-EOF
+ EOF
resources = Chef::Util::DSC::LocalConfigurationManager::Parser.parse(str, false)
expect(resources[0].changes_state?).to be_truthy
end
@@ -80,7 +80,7 @@ EOF
logtype: [machinename]: LCM: [ End Set ] [name]
logtype: [machinename]: LCM: [ End Resource ] [name]
logtype: [machinename]: LCM: [ End Set ]
-EOF
+ EOF
resources = Chef::Util::DSC::LocalConfigurationManager::Parser.parse(str, false)
expect(resources[0].change_log).to match_array(["[name]", "[message]", "[name]"])
end
@@ -92,7 +92,7 @@ EOF
logtype: [machinename]: LCM: [ Skip Set ] [name]
logtype: [machinename]: LCM: [ End Resource ] [name]
logtype: [machinename]: LCM: [ End Set ]
-EOF
+ EOF
resources = Chef::Util::DSC::LocalConfigurationManager::Parser.parse(str, false)
expect(resources[0].changes_state?).to be_falsey
end
@@ -104,7 +104,7 @@ EOF
logtype: [machinename]: LCM: [ Skip Set ] [name]
logtype: [machinename]: LCM: [ End Resource ] [name]
logtype: [machinename]: LCM: [ End Set ]
-EOF
+ EOF
resources = Chef::Util::DSC::LocalConfigurationManager::Parser.parse(str, false)
expect(resources[0].change_log).to be_empty
end
@@ -118,7 +118,7 @@ EOF
ResourcesNotInDesiredState: [name]
ReturnValue : 0
PSComputerName : .
-EOF
+ EOF
resources = Chef::Util::DSC::LocalConfigurationManager::Parser.parse(str, true)
expect(resources.length).to eq(1)
expect(resources[0].name).to eq("[name]")
@@ -131,7 +131,7 @@ EOF
ResourcesNotInDesiredState: [name]
ReturnValue : 0
PSComputerName : .
-EOF
+ EOF
resources = Chef::Util::DSC::LocalConfigurationManager::Parser.parse(str, true)
expect(resources[0].changes_state?).to be_truthy
end
@@ -143,7 +143,7 @@ EOF
ResourcesNotInDesiredState:
ReturnValue : 0
PSComputerName : .
-EOF
+ EOF
resources = Chef::Util::DSC::LocalConfigurationManager::Parser.parse(str, true)
expect(resources[0].changes_state?).to be_falsey
end
@@ -155,7 +155,7 @@ EOF
ResourcesNotInDesiredState:
ReturnValue : 0
PSComputerName : .
-EOF
+ EOF
resources = Chef::Util::DSC::LocalConfigurationManager::Parser.parse(str, true)
expect(resources[0].change_log).to be_empty
end
@@ -176,7 +176,7 @@ EOF
logtype: [machinename]: LCM: [ Start Set ]
logtype: [machinename]: LCM: [ End Set ]
logtype: [machinename]: LCM: [ End Set ]
-EOF
+ EOF
resources = Chef::Util::DSC::LocalConfigurationManager::Parser.parse(str, false)
expect(resources[0].changes_state?).to be_falsey
@@ -197,7 +197,7 @@ EOF
logtype: [machinename]: LCM: [ End Set ]
logtype: [machinename]: LCM: [ End Resource ]
logtype: [machinename]: LCM: [ End Set ]
-EOF
+ EOF
resources = Chef::Util::DSC::LocalConfigurationManager::Parser.parse(str, false)
expect(resources[0].changes_state?).to be_falsey
@@ -217,7 +217,7 @@ EOF
logtype: [machinename]: LCM: [ End Set ]
logtype: [machinename]: LCM: [ End Resource ]
logtype: [machinename]: LCM: [ End Set ]
-EOF
+ EOF
resources = Chef::Util::DSC::LocalConfigurationManager::Parser.parse(str, false)
expect(resources[0].changes_state?).to be_truthy
expect(resources[0].name).to eql("[name]")
@@ -239,7 +239,7 @@ EOF
ResourcesNotInDesiredState: [name2]
ReturnValue : 0
PSComputerName : .
-EOF
+ EOF
resources = Chef::Util::DSC::LocalConfigurationManager::Parser.parse(str, true)
expect(resources[0].changes_state?).to be_falsey
diff --git a/spec/unit/util/dsc/local_configuration_manager_spec.rb b/spec/unit/util/dsc/local_configuration_manager_spec.rb
index cce5a39537..4ef6abdd59 100644
--- a/spec/unit/util/dsc/local_configuration_manager_spec.rb
+++ b/spec/unit/util/dsc/local_configuration_manager_spec.rb
@@ -29,7 +29,7 @@ describe Chef::Util::DSC::LocalConfigurationManager do
logtype: [machinename]: LCM: [ Start Resource ] [name]
logtype: [machinename]: LCM: [ End Resource ] [name]
logtype: [machinename]: LCM: [ End Set ]
-EOH
+ EOH
end
let(:no_whatif_lcm_output) do
@@ -40,13 +40,13 @@ EOH
+ ~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Start-DscConfiguration], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,SomeCompany.SomeAssembly.Commands.RunSomeCommand
-EOH
+ EOH
end
let(:dsc_resource_import_failure_output) do
<<~EOH
PowerShell provider MSFT_xWebsite failed to execute Test-TargetResource functionality with error message: Please ensure that WebAdministration module is installed. + CategoryInfo : InvalidOperation: (:) [], CimException + FullyQualifiedErrorId : ProviderOperationExecutionFailure + PSComputerName : . PowerShell provider MSFT_xWebsite failed to execute Test-TargetResource functionality with error message: Please ensure that WebAdministration module is installed. + CategoryInfo : InvalidOperation: (:) [], CimException + FullyQualifiedErrorId : ProviderOperationExecutionFailure + PSComputerName : . The SendConfigurationApply function did not succeed. + CategoryInfo : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException + FullyQualifiedErrorId : MI RESULT 1 + PSComputerName : .
-EOH
+ EOH
end
let(:lcm_status) do