diff options
author | Noah Kantrowitz <noah@coderanger.net> | 2018-07-02 16:20:22 -0700 |
---|---|---|
committer | Noah Kantrowitz <noah@coderanger.net> | 2018-07-02 16:20:22 -0700 |
commit | 5b2be9fdde75ddaffa3447bc354806b2efb4b095 (patch) | |
tree | a078e952e444ac5d5be69779e5414e99ac66df85 /chef-config/spec | |
parent | a4b8940d2690eb92d54d7d56a0c638fca6f3808f (diff) | |
parent | f23bc124f577ee628879079754331724593a82a3 (diff) | |
download | chef-5b2be9fdde75ddaffa3447bc354806b2efb4b095.tar.gz |
Merge branch 'master' into yet-more-creds
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
Diffstat (limited to 'chef-config/spec')
-rw-r--r-- | chef-config/spec/spec_helper.rb | 4 | ||||
-rw-r--r-- | chef-config/spec/unit/workstation_config_loader_spec.rb | 76 |
2 files changed, 40 insertions, 40 deletions
diff --git a/chef-config/spec/spec_helper.rb b/chef-config/spec/spec_helper.rb index 107becb9eb..6a324474e1 100644 --- a/chef-config/spec/spec_helper.rb +++ b/chef-config/spec/spec_helper.rb @@ -32,8 +32,8 @@ RSpec.configure do |config| config.filter_run :focus config.run_all_when_everything_filtered = true - config.filter_run_excluding :windows_only => true unless ChefConfig.windows? - config.filter_run_excluding :unix_only => true if ChefConfig.windows? + config.filter_run_excluding windows_only: true unless ChefConfig.windows? + config.filter_run_excluding unix_only: true if ChefConfig.windows? # Limits the available syntax to the non-monkey patched syntax that is # recommended. For more details, see: diff --git a/chef-config/spec/unit/workstation_config_loader_spec.rb b/chef-config/spec/unit/workstation_config_loader_spec.rb index 024cb3e928..28fbdf63dd 100644 --- a/chef-config/spec/unit/workstation_config_loader_spec.rb +++ b/chef-config/spec/unit/workstation_config_loader_spec.rb @@ -453,12 +453,12 @@ RSpec.describe ChefConfig::WorkstationConfigLoader do context "and has a default profile" do let(:content) do - content = <<EOH -[default] -node_name = 'barney' -client_key = "barney_rubble.pem" -chef_server_url = "https://api.chef.io/organizations/bedrock" -invalid_config_option1234 = "foobar" + content = <<~EOH + [default] + node_name = 'barney' + client_key = "barney_rubble.pem" + chef_server_url = "https://api.chef.io/organizations/bedrock" + invalid_config_option1234 = "foobar" EOH content end @@ -474,16 +474,16 @@ EOH context "and has a default profile with knife settings" do let(:content) do - content = <<EOH -[default] -node_name = 'barney' -client_key = "barney_rubble.pem" -chef_server_url = "https://api.chef.io/organizations/bedrock" -knife = { - secret_file = "/home/barney/.chef/encrypted_data_bag_secret.pem" -} -[default.knife] -ssh_user = "knife_ssh_user" + content = <<~EOH + [default] + node_name = 'barney' + client_key = "barney_rubble.pem" + chef_server_url = "https://api.chef.io/organizations/bedrock" + knife = { + secret_file = "/home/barney/.chef/encrypted_data_bag_secret.pem" + } + [default.knife] + ssh_user = "knife_ssh_user" EOH content end @@ -500,21 +500,21 @@ EOH context "and has a profile containing a full key" do let(:content) do - content = <<EOH -[default] -client_key = """ ------BEGIN RSA PRIVATE KEY----- -foo -""" + content = <<~EOH + [default] + client_key = """ + -----BEGIN RSA PRIVATE KEY----- + foo + """ EOH content end it "applies the expected config" do expect { config_loader.load_credentials }.not_to raise_error - expect(ChefConfig::Config.client_key_contents).to eq(<<EOH ------BEGIN RSA PRIVATE KEY----- -foo + expect(ChefConfig::Config.client_key_contents).to eq(<<~EOH + -----BEGIN RSA PRIVATE KEY----- + foo EOH ) end @@ -522,15 +522,15 @@ EOH context "and has several profiles" do let(:content) do - content = <<EOH -[default] -client_name = "default" -[environment] -client_name = "environment" -[explicit] -client_name = "explicit" -[context] -client_name = "context" + content = <<~EOH + [default] + client_name = "default" + [environment] + client_name = "environment" + [explicit] + client_name = "explicit" + [context] + client_name = "context" EOH content end @@ -569,10 +569,10 @@ EOH context "and contains both node_name and client_name" do let(:content) do - content = <<EOH -[default] -node_name = 'barney' -client_name = 'barney' + content = <<~EOH + [default] + node_name = 'barney' + client_name = 'barney' EOH content end |