cheffish 14.0.13 → 16.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -9
- data/Rakefile +1 -1
- data/cheffish.gemspec +3 -3
- data/lib/chef/resource/chef_acl.rb +17 -14
- data/lib/chef/resource/chef_client.rb +3 -3
- data/lib/chef/resource/chef_container.rb +4 -4
- data/lib/chef/resource/chef_data_bag.rb +3 -3
- data/lib/chef/resource/chef_data_bag_item.rb +13 -12
- data/lib/chef/resource/chef_environment.rb +2 -2
- data/lib/chef/resource/chef_group.rb +2 -2
- data/lib/chef/resource/chef_mirror.rb +6 -5
- data/lib/chef/resource/chef_node.rb +2 -2
- data/lib/chef/resource/chef_organization.rb +3 -3
- data/lib/chef/resource/chef_resolved_cookbooks.rb +5 -3
- data/lib/chef/resource/chef_role.rb +6 -2
- data/lib/chef/resource/chef_user.rb +2 -2
- data/lib/chef/resource/private_key.rb +11 -11
- data/lib/chef/resource/public_key.rb +5 -4
- data/lib/cheffish.rb +1 -0
- data/lib/cheffish/base_resource.rb +13 -11
- data/lib/cheffish/basic_chef_client.rb +4 -5
- data/lib/cheffish/chef_actor_base.rb +3 -2
- data/lib/cheffish/chef_run.rb +5 -6
- data/lib/cheffish/chef_run_listener.rb +1 -3
- data/lib/cheffish/key_formatter.rb +5 -13
- data/lib/cheffish/merged_config.rb +2 -2
- data/lib/cheffish/node_properties.rb +7 -3
- data/lib/cheffish/recipe_dsl.rb +2 -2
- data/lib/cheffish/rspec/chef_run_support.rb +2 -2
- data/lib/cheffish/rspec/matchers/have_updated.rb +5 -5
- data/lib/cheffish/rspec/recipe_run_wrapper.rb +2 -2
- data/lib/cheffish/rspec/repository_support.rb +1 -0
- data/lib/cheffish/version.rb +1 -1
- data/spec/functional/fingerprint_spec.rb +8 -6
- data/spec/integration/chef_acl_spec.rb +28 -20
- data/spec/integration/chef_group_spec.rb +2 -2
- data/spec/integration/chef_node_spec.rb +2 -2
- data/spec/integration/chef_role_spec.rb +2 -2
- metadata +7 -7
@@ -27,7 +27,7 @@ module Cheffish
|
|
27
27
|
result_configs = []
|
28
28
|
configs.each do |config|
|
29
29
|
value = config[name]
|
30
|
-
|
30
|
+
unless value.nil?
|
31
31
|
if value.respond_to?(:keys)
|
32
32
|
result_configs << value
|
33
33
|
elsif result_configs.size > 0
|
@@ -63,7 +63,7 @@ module Cheffish
|
|
63
63
|
alias_method :has_key?, :key?
|
64
64
|
|
65
65
|
def keys
|
66
|
-
configs.flat_map
|
66
|
+
configs.flat_map(&:keys).uniq
|
67
67
|
end
|
68
68
|
|
69
69
|
def values
|
@@ -39,7 +39,7 @@ module Cheffish
|
|
39
39
|
attribute "tags" do |existing_tags|
|
40
40
|
existing_tags ||= []
|
41
41
|
tags.each do |tag|
|
42
|
-
|
42
|
+
unless existing_tags.include?(tag.to_s)
|
43
43
|
existing_tags << tag.to_s
|
44
44
|
end
|
45
45
|
end
|
@@ -64,8 +64,8 @@ module Cheffish
|
|
64
64
|
if tags.size == 0
|
65
65
|
attribute("tags")
|
66
66
|
else
|
67
|
-
tags = tags[0] if tags.size == 1 && tags[0].
|
68
|
-
attribute("tags", tags.map
|
67
|
+
tags = tags[0] if tags.size == 1 && tags[0].is_a?(Array)
|
68
|
+
attribute("tags", tags.map(&:to_s))
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
@@ -80,6 +80,7 @@ module Cheffish
|
|
80
80
|
if recipes.size == 0
|
81
81
|
raise ArgumentError, "At least one recipe must be specified"
|
82
82
|
end
|
83
|
+
|
83
84
|
@run_list_modifiers ||= []
|
84
85
|
@run_list_modifiers += recipes.map { |recipe| Chef::RunList::RunListItem.new("recipe[#{recipe}]") }
|
85
86
|
end
|
@@ -88,6 +89,7 @@ module Cheffish
|
|
88
89
|
if roles.size == 0
|
89
90
|
raise ArgumentError, "At least one role must be specified"
|
90
91
|
end
|
92
|
+
|
91
93
|
@run_list_modifiers ||= []
|
92
94
|
@run_list_modifiers += roles.map { |role| Chef::RunList::RunListItem.new("role[#{role}]") }
|
93
95
|
end
|
@@ -96,6 +98,7 @@ module Cheffish
|
|
96
98
|
if recipes.size == 0
|
97
99
|
raise ArgumentError, "At least one recipe must be specified"
|
98
100
|
end
|
101
|
+
|
99
102
|
@run_list_removers ||= []
|
100
103
|
@run_list_removers += recipes.map { |recipe| Chef::RunList::RunListItem.new("recipe[#{recipe}]") }
|
101
104
|
end
|
@@ -104,6 +107,7 @@ module Cheffish
|
|
104
107
|
if roles.size == 0
|
105
108
|
raise ArgumentError, "At least one role must be specified"
|
106
109
|
end
|
110
|
+
|
107
111
|
@run_list_removers ||= []
|
108
112
|
@run_list_removers += roles.map { |role| Chef::RunList::RunListItem.new("role[#{role}]") }
|
109
113
|
end
|
data/lib/cheffish/recipe_dsl.rb
CHANGED
@@ -52,7 +52,7 @@ class Chef
|
|
52
52
|
|
53
53
|
# Create the data store chef-zero will use
|
54
54
|
options[:data_store] ||= begin
|
55
|
-
|
55
|
+
unless options[:chef_repo_path]
|
56
56
|
raise "chef_repo_path must be specified to with_chef_local_server"
|
57
57
|
end
|
58
58
|
|
@@ -63,7 +63,7 @@ class Chef
|
|
63
63
|
symbol_key = "#{type}_path".to_sym
|
64
64
|
|
65
65
|
options[symbol_key] ||= begin
|
66
|
-
if options[:chef_repo_path].
|
66
|
+
if options[:chef_repo_path].is_a?(String)
|
67
67
|
Chef::Util::PathHelper.join(options[:chef_repo_path], "#{type}s")
|
68
68
|
else
|
69
69
|
options[:chef_repo_path].map { |path| Chef::Util::PathHelper.join(path, "#{type}s") }
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require "chef_zero/rspec"
|
2
2
|
require "chef/server_api"
|
3
3
|
require_relative "repository_support"
|
4
|
-
require "uri"
|
4
|
+
require "uri" unless defined?(URI)
|
5
5
|
require_relative "../chef_run"
|
6
6
|
require_relative "recipe_run_wrapper"
|
7
7
|
require_relative "matchers"
|
@@ -58,7 +58,7 @@ module Cheffish
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def recipe(str = nil, file = nil, line = nil, &recipe)
|
61
|
-
|
61
|
+
unless recipe
|
62
62
|
if file && line
|
63
63
|
recipe = proc { eval(str, nil, file, line) } # rubocop:disable Security/Eval
|
64
64
|
else
|
@@ -5,16 +5,16 @@ RSpec::Matchers.define :have_updated do |resource_name, *expected_actions|
|
|
5
5
|
@recipe = recipe
|
6
6
|
actual = @recipe.event_sink.events
|
7
7
|
actual_actions = actual.select { |event, resource, action| event == :resource_updated && resource.to_s == resource_name }
|
8
|
-
|
8
|
+
.map { |event, resource, action| action }
|
9
9
|
expect(actual_actions).to eq(expected_actions)
|
10
10
|
end
|
11
11
|
|
12
12
|
failure_message do
|
13
13
|
actual = @recipe.event_sink.events
|
14
14
|
updates = actual.select { |event, resource, action| event == :resource_updated }.to_a
|
15
|
-
result = "expected that the chef_run would #{expected_actions.join(
|
15
|
+
result = "expected that the chef_run would #{expected_actions.join(",")} #{resource_name}."
|
16
16
|
if updates.size > 0
|
17
|
-
result << " Actual updates were #{updates.map { |event, resource, action| "#{resource} => #{action.inspect}" }.join(
|
17
|
+
result << " Actual updates were #{updates.map { |event, resource, action| "#{resource} => #{action.inspect}" }.join(", ")}"
|
18
18
|
else
|
19
19
|
result << " Nothing was updated."
|
20
20
|
end
|
@@ -24,9 +24,9 @@ RSpec::Matchers.define :have_updated do |resource_name, *expected_actions|
|
|
24
24
|
failure_message_when_negated do
|
25
25
|
actual = @recipe.event_sink.events
|
26
26
|
updates = actual.select { |event, resource, action| event == :resource_updated }.to_a
|
27
|
-
result = "expected that the chef_run would not #{expected_actions.join(
|
27
|
+
result = "expected that the chef_run would not #{expected_actions.join(",")} #{resource_name}."
|
28
28
|
if updates.size > 0
|
29
|
-
result << " Actual updates were #{updates.map { |event, resource, action| "#{resource} => #{action.inspect}" }.join(
|
29
|
+
result << " Actual updates were #{updates.map { |event, resource, action| "#{resource} => #{action.inspect}" }.join(", ")}"
|
30
30
|
else
|
31
31
|
result << " Nothing was updated."
|
32
32
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require_relative "../chef_run"
|
2
|
-
require "forwardable"
|
2
|
+
require "forwardable" unless defined?(Forwardable)
|
3
3
|
|
4
4
|
module Cheffish
|
5
5
|
module RSpec
|
@@ -14,7 +14,7 @@ module Cheffish
|
|
14
14
|
attr_reader :example
|
15
15
|
|
16
16
|
def client
|
17
|
-
|
17
|
+
unless @client
|
18
18
|
super
|
19
19
|
example = self.example
|
20
20
|
|
@@ -12,6 +12,7 @@ module Cheffish
|
|
12
12
|
::RSpec.shared_context "with a chef repo" do
|
13
13
|
before :each do
|
14
14
|
raise "Can only create one directory per test" if @repository_dir
|
15
|
+
|
15
16
|
@repository_dir = Dir.mktmpdir("chef_repo")
|
16
17
|
Chef::Config.chef_repo_path = @repository_dir
|
17
18
|
%w{client cookbook data_bag environment node role user}.each do |object_name|
|
data/lib/cheffish/version.rb
CHANGED
@@ -39,24 +39,26 @@ describe "Cheffish fingerprint key formatter" do
|
|
39
39
|
|
40
40
|
context "when computing key fingperprints" do
|
41
41
|
|
42
|
-
it "
|
43
|
-
expect
|
44
|
-
"88:7e:3a:bd:26:9f:b5:c5:d8:ae:52:f9:df:0b:64:a4:5c:17:0a:87")
|
42
|
+
it "raises when passing a PKCS#8 SHA1 private key fingerprint" do
|
43
|
+
expect { key_to_format(sample_private_key, :pkcs8sha1fingerprint) }.to raise_error
|
45
44
|
end
|
46
45
|
|
47
46
|
it "computes the PKCS#1 MD5 public key fingerprint correctly" do
|
48
47
|
expect(key_to_format(sample_public_key, :pkcs1md5fingerprint)).to eq(
|
49
|
-
"1f:e8:da:c1:16:c3:72:7d:90:e2:b7:64:c4:b4:55:20"
|
48
|
+
"1f:e8:da:c1:16:c3:72:7d:90:e2:b7:64:c4:b4:55:20"
|
49
|
+
)
|
50
50
|
end
|
51
51
|
|
52
52
|
it "computes the RFC4716 MD5 public key fingerprint correctly" do
|
53
53
|
expect(key_to_format(sample_public_key, :rfc4716md5fingerprint)).to eq(
|
54
|
-
"b0:13:4f:da:cf:8c:dc:a7:4a:1f:d2:3a:51:92:cf:6b"
|
54
|
+
"b0:13:4f:da:cf:8c:dc:a7:4a:1f:d2:3a:51:92:cf:6b"
|
55
|
+
)
|
55
56
|
end
|
56
57
|
|
57
58
|
it "defaults to the PKCS#1 MD5 public key fingerprint" do
|
58
59
|
expect(key_to_format(sample_public_key, :fingerprint)).to eq(
|
59
|
-
key_to_format(sample_public_key, :pkcs1md5fingerprint)
|
60
|
+
key_to_format(sample_public_key, :pkcs1md5fingerprint)
|
61
|
+
)
|
60
62
|
end
|
61
63
|
|
62
64
|
end
|
@@ -160,7 +160,7 @@ if Gem::Version.new(ChefZero::VERSION) >= Gem::Version.new("3.1")
|
|
160
160
|
it 'Converging chef_acl "nodes/x" with rights [ :read, :create, :update, :delete, :grant ] modifies all rights' do
|
161
161
|
expect_recipe do
|
162
162
|
chef_acl "nodes/x" do
|
163
|
-
rights
|
163
|
+
rights %i{create read update delete grant}, users: %w{u1 u2}, clients: %w{c1}, groups: %w{g1}
|
164
164
|
end
|
165
165
|
end.to be_updated
|
166
166
|
expect(get("nodes/x/_acl")).to partially_match(
|
@@ -191,7 +191,7 @@ if Gem::Version.new(ChefZero::VERSION) >= Gem::Version.new("3.1")
|
|
191
191
|
it 'Converging chef_acl "nodes/y" throws a 404' do
|
192
192
|
expect_converge do
|
193
193
|
chef_acl "nodes/y"
|
194
|
-
end.to raise_error(Net::
|
194
|
+
end.to raise_error(Net::HTTPClientException)
|
195
195
|
end
|
196
196
|
end
|
197
197
|
|
@@ -229,11 +229,11 @@ if Gem::Version.new(ChefZero::VERSION) >= Gem::Version.new("3.1")
|
|
229
229
|
end
|
230
230
|
end.to be_updated
|
231
231
|
expect(get("nodes/x/_acl")).to partially_match(
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
232
|
+
"create" => { "actors" => exclude("foo") },
|
233
|
+
"read" => { "actors" => exclude("foo") },
|
234
|
+
"update" => { "actors" => exclude("foo") },
|
235
|
+
"delete" => { "actors" => exclude("foo") },
|
236
|
+
"grant" => { "actors" => exclude("foo") }
|
237
237
|
)
|
238
238
|
end
|
239
239
|
end
|
@@ -361,7 +361,8 @@ if Gem::Version.new(ChefZero::VERSION) >= Gem::Version.new("3.1")
|
|
361
361
|
end.to be_updated
|
362
362
|
%w{clients containers cookbooks data environments groups nodes roles}.each do |type|
|
363
363
|
expect(get("/organizations/foo/#{type}/x/_acl")).to partially_match(
|
364
|
-
|
364
|
+
"read" => { "actors" => %w{u} }
|
365
|
+
)
|
365
366
|
end
|
366
367
|
end
|
367
368
|
end
|
@@ -408,7 +409,8 @@ if Gem::Version.new(ChefZero::VERSION) >= Gem::Version.new("3.1")
|
|
408
409
|
end.to be_updated
|
409
410
|
%w{clients containers cookbooks data environments groups nodes roles sandboxes}.each do |type|
|
410
411
|
expect(get("/organizations/foo/#{type}/x/_acl")).to partially_match(
|
411
|
-
|
412
|
+
"read" => { "actors" => %w{u} }
|
413
|
+
)
|
412
414
|
end
|
413
415
|
end
|
414
416
|
|
@@ -420,7 +422,8 @@ if Gem::Version.new(ChefZero::VERSION) >= Gem::Version.new("3.1")
|
|
420
422
|
end.to be_updated
|
421
423
|
%w{clients containers cookbooks data environments groups nodes roles}.each do |type|
|
422
424
|
expect(get("/organizations/foo/#{type}/x/_acl")).to partially_match(
|
423
|
-
|
425
|
+
"read" => { "actors" => %w{u} }
|
426
|
+
)
|
424
427
|
end
|
425
428
|
end
|
426
429
|
|
@@ -447,7 +450,7 @@ if Gem::Version.new(ChefZero::VERSION) >= Gem::Version.new("3.1")
|
|
447
450
|
chef_acl "/organizations/foo/cookbooks/x/1.0.0" do
|
448
451
|
rights :read, users: %w{u}
|
449
452
|
end
|
450
|
-
end.to raise_error(
|
453
|
+
end.to raise_error(%r{ACLs cannot be set on children of /organizations/foo/cookbooks/x})
|
451
454
|
end
|
452
455
|
|
453
456
|
it "chef_acl '/organizations/foo/cookbooks/*/*' raises an error" do
|
@@ -456,7 +459,7 @@ if Gem::Version.new(ChefZero::VERSION) >= Gem::Version.new("3.1")
|
|
456
459
|
chef_acl "/organizations/foo/cookbooks/*/*" do
|
457
460
|
rights :read, users: %w{u}
|
458
461
|
end
|
459
|
-
end.to raise_error(
|
462
|
+
end.to raise_error(%r{ACLs cannot be set on children of /organizations/foo/cookbooks/*})
|
460
463
|
end
|
461
464
|
|
462
465
|
it 'chef_acl "/organizations/foo/data/x/y" raises an error' do
|
@@ -464,7 +467,7 @@ if Gem::Version.new(ChefZero::VERSION) >= Gem::Version.new("3.1")
|
|
464
467
|
chef_acl "/organizations/foo/data/x/y" do
|
465
468
|
rights :read, users: %w{u}
|
466
469
|
end
|
467
|
-
end.to raise_error(
|
470
|
+
end.to raise_error(%r{ACLs cannot be set on children of /organizations/foo/data/x})
|
468
471
|
end
|
469
472
|
|
470
473
|
it 'chef_acl "/organizations/foo/data/*/*" raises an error' do
|
@@ -473,7 +476,7 @@ if Gem::Version.new(ChefZero::VERSION) >= Gem::Version.new("3.1")
|
|
473
476
|
chef_acl "/organizations/foo/data/*/*" do
|
474
477
|
rights :read, users: %w{u}
|
475
478
|
end
|
476
|
-
end.to raise_error(
|
479
|
+
end.to raise_error(%r{ACLs cannot be set on children of /organizations/foo/data/*})
|
477
480
|
end
|
478
481
|
|
479
482
|
it 'chef_acl "/organizations/foo" changes the acl' do
|
@@ -609,7 +612,8 @@ if Gem::Version.new(ChefZero::VERSION) >= Gem::Version.new("3.1")
|
|
609
612
|
end.to be_updated
|
610
613
|
%w{clients containers cookbooks data environments groups nodes roles sandboxes}.each do |type|
|
611
614
|
expect(get("#{type}/x/_acl")).to partially_match(
|
612
|
-
|
615
|
+
"read" => { "actors" => %w{u} }
|
616
|
+
)
|
613
617
|
end
|
614
618
|
end
|
615
619
|
|
@@ -621,7 +625,8 @@ if Gem::Version.new(ChefZero::VERSION) >= Gem::Version.new("3.1")
|
|
621
625
|
end.to be_updated
|
622
626
|
%w{clients containers cookbooks data environments groups nodes roles}.each do |type|
|
623
627
|
expect(get("#{type}/x/_acl")).to partially_match(
|
624
|
-
|
628
|
+
"read" => { "actors" => %w{u} }
|
629
|
+
)
|
625
630
|
end
|
626
631
|
end
|
627
632
|
|
@@ -633,7 +638,8 @@ if Gem::Version.new(ChefZero::VERSION) >= Gem::Version.new("3.1")
|
|
633
638
|
end.to be_updated
|
634
639
|
%w{admins billing-admins clients users x}.each do |n|
|
635
640
|
expect(get("groups/#{n}/_acl")).to partially_match(
|
636
|
-
|
641
|
+
"read" => { "actors" => %w{u} }
|
642
|
+
)
|
637
643
|
end
|
638
644
|
end
|
639
645
|
|
@@ -713,7 +719,8 @@ if Gem::Version.new(ChefZero::VERSION) >= Gem::Version.new("3.1")
|
|
713
719
|
end.to be_updated
|
714
720
|
%w{clients containers cookbooks data environments groups nodes roles sandboxes}.each do |type|
|
715
721
|
expect(get("/organizations/foo/containers/#{type}/_acl")).to partially_match(
|
716
|
-
|
722
|
+
"read" => { "actors" => %w{u} }
|
723
|
+
)
|
717
724
|
end
|
718
725
|
end
|
719
726
|
|
@@ -768,7 +775,8 @@ if Gem::Version.new(ChefZero::VERSION) >= Gem::Version.new("3.1")
|
|
768
775
|
end.to be_updated
|
769
776
|
%w{clients containers cookbooks data environments groups nodes roles sandboxes}.each do |type|
|
770
777
|
expect(get("containers/#{type}/_acl")).to partially_match(
|
771
|
-
|
778
|
+
"read" => { "actors" => %w{u} }
|
779
|
+
)
|
772
780
|
end
|
773
781
|
end
|
774
782
|
end
|
@@ -820,7 +828,7 @@ if Gem::Version.new(ChefZero::VERSION) >= Gem::Version.new("3.1")
|
|
820
828
|
it 'chef_acl with remove_rights [ :create, :read ], "u", "c", "g" removes all three' do
|
821
829
|
expect_recipe do
|
822
830
|
chef_acl "nodes/x" do
|
823
|
-
remove_rights
|
831
|
+
remove_rights %i{create read}, users: %w{u}, clients: %w{c}, groups: %w{g}
|
824
832
|
end
|
825
833
|
end.to be_updated
|
826
834
|
expect(get("nodes/x/_acl")).to partially_match(
|
@@ -37,7 +37,7 @@ describe Chef::Resource::ChefGroup do
|
|
37
37
|
action :delete
|
38
38
|
end
|
39
39
|
end.to not_have_updated("chef_group[x]", :delete).and not_have_updated("chef_group[x]", :create)
|
40
|
-
expect { get("groups/x") }.to raise_error(Net::
|
40
|
+
expect { get("groups/x") }.to raise_error(Net::HTTPClientException)
|
41
41
|
end
|
42
42
|
|
43
43
|
it 'Converging chef_group "x" creates the group with the given members' do
|
@@ -101,7 +101,7 @@ describe Chef::Resource::ChefGroup do
|
|
101
101
|
action :delete
|
102
102
|
end
|
103
103
|
end.to have_updated("chef_group[x]", :delete)
|
104
|
-
expect { get("groups/x") }.to raise_error(Net::
|
104
|
+
expect { get("groups/x") }.to raise_error(Net::HTTPClientException)
|
105
105
|
end
|
106
106
|
|
107
107
|
it 'Converging chef_group "x" with existing users changes nothing' do
|
@@ -40,7 +40,7 @@ describe Chef::Resource::ChefNode do
|
|
40
40
|
with_chef_server "http://127.0.0.1:8899"
|
41
41
|
chef_node "blah"
|
42
42
|
end.to have_updated "chef_node[blah]", :create
|
43
|
-
expect { get("nodes/blah") }.to raise_error(Net::
|
43
|
+
expect { get("nodes/blah") }.to raise_error(Net::HTTPClientException)
|
44
44
|
expect(get("http://127.0.0.1:8899/nodes/blah")["name"]).to eq("blah")
|
45
45
|
end
|
46
46
|
end
|
@@ -53,7 +53,7 @@ describe Chef::Resource::ChefNode do
|
|
53
53
|
chef_server({ chef_server_url: "http://127.0.0.1:8899" })
|
54
54
|
end
|
55
55
|
end.to have_updated "chef_node[blah]", :create
|
56
|
-
expect { get("nodes/blah") }.to raise_error(Net::
|
56
|
+
expect { get("nodes/blah") }.to raise_error(Net::HTTPClientException)
|
57
57
|
expect(get("http://127.0.0.1:8899/nodes/blah")["name"]).to eq("blah")
|
58
58
|
end
|
59
59
|
end
|
@@ -40,7 +40,7 @@ describe Chef::Resource::ChefRole do
|
|
40
40
|
with_chef_server "http://127.0.0.1:8899"
|
41
41
|
chef_role "blah"
|
42
42
|
end.to have_updated "chef_role[blah]", :create
|
43
|
-
expect { get("roles/blah") }.to raise_error(Net::
|
43
|
+
expect { get("roles/blah") }.to raise_error(Net::HTTPClientException)
|
44
44
|
expect(get("http://127.0.0.1:8899/roles/blah")["name"]).to eq("blah")
|
45
45
|
end
|
46
46
|
end
|
@@ -53,7 +53,7 @@ describe Chef::Resource::ChefRole do
|
|
53
53
|
chef_server({ chef_server_url: "http://127.0.0.1:8899" })
|
54
54
|
end
|
55
55
|
end.to have_updated "chef_role[blah]", :create
|
56
|
-
expect { get("roles/blah") }.to raise_error(Net::
|
56
|
+
expect { get("roles/blah") }.to raise_error(Net::HTTPClientException)
|
57
57
|
expect(get("http://127.0.0.1:8899/roles/blah")["name"]).to eq("blah")
|
58
58
|
end
|
59
59
|
end
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cheffish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 16.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef Software Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-zero
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '14.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '14.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
description: A set of Chef resources for configuring Chef.
|
41
|
+
description: A set of Chef resources for configuring Chef Infra.
|
42
42
|
email: oss@chef.io
|
43
43
|
executables: []
|
44
44
|
extensions: []
|
@@ -120,7 +120,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
120
120
|
requirements:
|
121
121
|
- - ">="
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 2.
|
123
|
+
version: 2.6.0
|
124
124
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
125
|
requirements:
|
126
126
|
- - ">="
|
@@ -130,5 +130,5 @@ requirements: []
|
|
130
130
|
rubygems_version: 3.0.3
|
131
131
|
signing_key:
|
132
132
|
specification_version: 4
|
133
|
-
summary: A set of Chef resources for configuring Chef.
|
133
|
+
summary: A set of Chef resources for configuring Chef Infra.
|
134
134
|
test_files: []
|