summaryrefslogtreecommitdiff
path: root/chef-config/spec/unit
diff options
context:
space:
mode:
authorNoah Kantrowitz <noah@coderanger.net>2018-07-02 16:20:22 -0700
committerNoah Kantrowitz <noah@coderanger.net>2018-07-02 16:20:22 -0700
commit5b2be9fdde75ddaffa3447bc354806b2efb4b095 (patch)
treea078e952e444ac5d5be69779e5414e99ac66df85 /chef-config/spec/unit
parenta4b8940d2690eb92d54d7d56a0c638fca6f3808f (diff)
parentf23bc124f577ee628879079754331724593a82a3 (diff)
downloadchef-5b2be9fdde75ddaffa3447bc354806b2efb4b095.tar.gz
Merge branch 'master' into yet-more-creds
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
Diffstat (limited to 'chef-config/spec/unit')
-rw-r--r--chef-config/spec/unit/workstation_config_loader_spec.rb76
1 files changed, 38 insertions, 38 deletions
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