summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-05-08 22:49:54 -0700
committerTim Smith <tsmith@chef.io>2019-05-17 12:26:31 -0700
commitc2aefc53e08971f887a0bd2e66b881031804c1b6 (patch)
tree77f3ef6436c54aab4884c177da212581af6164e3
parent6c785c0b69f4a0e9700b26ccb7922be75635f645 (diff)
downloadchef-c2aefc53e08971f887a0bd2e66b881031804c1b6.tar.gz
Cleanup merge artifactsremove_deprecations
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/node_map.rb2
-rw-r--r--spec/unit/node_map_spec.rb18
2 files changed, 4 insertions, 16 deletions
diff --git a/lib/chef/node_map.rb b/lib/chef/node_map.rb
index 9b572ed387..70640bebec 100644
--- a/lib/chef/node_map.rb
+++ b/lib/chef/node_map.rb
@@ -55,7 +55,7 @@ EOH
#
# @return [NodeMap] Returns self for possible chaining
#
- def set(key, klass, platform: nil, platform_version: nil, platform_family: nil, os: nil, canonical: nil, override: nil, chef_version: nil, target_mode: nil, &block)
+ def set(key, klass, platform: nil, platform_version: nil, platform_family: nil, os: nil, canonical: nil, override: nil, chef_version: nil, &block)
new_matcher = { klass: klass }
new_matcher[:platform] = platform if platform
new_matcher[:platform_version] = platform_version if platform_version
diff --git a/spec/unit/node_map_spec.rb b/spec/unit/node_map_spec.rb
index 0f3c51ef37..df463901a5 100644
--- a/spec/unit/node_map_spec.rb
+++ b/spec/unit/node_map_spec.rb
@@ -145,22 +145,14 @@ describe Chef::NodeMap do
describe "deleting classes" do
it "deletes a class and removes the mapping completely" do
node_map.set(:thing, Bar)
-<<<<<<< HEAD
- expect( node_map.delete_class(Bar) ).to include({ thing: [{ klass: Bar, cookbook_override: false, core_override: false }] })
-=======
- expect( node_map.delete_class(Bar) ).to include({ thing: [{ klass: Bar, target_mode: nil }] })
->>>>>>> 896c67a9d... Remove resource collision deprecations
+ expect( node_map.delete_class(Bar) ).to include({ thing: [{ klass: Bar }] })
expect( node_map.get(node, :thing) ).to eql(nil)
end
it "deletes a class and leaves the mapping that still has an entry" do
node_map.set(:thing, Bar)
node_map.set(:thing, Foo)
-<<<<<<< HEAD
- expect( node_map.delete_class(Bar) ).to eql({ thing: [{ klass: Bar, cookbook_override: false, core_override: false }] })
-=======
- expect( node_map.delete_class(Bar) ).to eql({ thing: [{ klass: Bar, target_mode: nil }] })
->>>>>>> 896c67a9d... Remove resource collision deprecations
+ expect( node_map.delete_class(Bar) ).to eql({ thing: [{ klass: Bar }] })
expect( node_map.get(node, :thing) ).to eql(Foo)
end
@@ -168,11 +160,7 @@ describe Chef::NodeMap do
node_map.set(:thing1, Bar)
node_map.set(:thing2, Bar)
node_map.set(:thing2, Foo)
-<<<<<<< HEAD
- expect( node_map.delete_class(Bar) ).to eql({ thing1: [{ klass: Bar, cookbook_override: false, core_override: false }], thing2: [{ klass: Bar, cookbook_override: false, core_override: false }] })
-=======
- expect( node_map.delete_class(Bar) ).to eql({ thing1: [{ klass: Bar, target_mode: nil }], thing2: [{ klass: Bar, target_mode: nil }] })
->>>>>>> 896c67a9d... Remove resource collision deprecations
+ expect( node_map.delete_class(Bar) ).to eql({ thing1: [{ klass: Bar }], thing2: [{ klass: Bar }] })
expect( node_map.get(node, :thing1) ).to eql(nil)
expect( node_map.get(node, :thing2) ).to eql(Foo)
end