|
94 | 94 | kitty = Chef::Resource::Cat.new("loulou") |
95 | 95 | node = Chef::Node.new |
96 | 96 | node.name("Intel") |
97 | | - node.operatingsystem("Darwin") |
98 | | - node.operatingsystemversion("9.2.2") |
| 97 | + node.platform("mac_os_x") |
| 98 | + node.platform_version("9.2.2") |
99 | 99 | Chef::Platform.find_provider_for_node(node, kitty).should eql("nice") |
100 | 100 | end |
101 | 101 |
|
102 | | - it "should prefer lsbdistid over operatingsystem when looking up via node" do |
103 | | - kitty = Chef::Resource::Cat.new("loulou") |
104 | | - node = Chef::Node.new |
105 | | - node.name("Intel") |
106 | | - node.operatingsystem("Darwin") |
107 | | - node.operatingsystemversion("9.2.2") |
108 | | - node.lsbdistid("Not Linux") |
109 | | - Chef::Platform.set( |
110 | | - :platform => :not_linux, |
111 | | - :resource => :cat, |
112 | | - :provider => "bourbon" |
113 | | - ) |
114 | | - Chef::Platform.find_provider_for_node(node, kitty).should eql("bourbon") |
115 | | - end |
116 | | - |
117 | | - it "should prefer macosx_productnmae over operatingsystem when looking up via node" do |
118 | | - kitty = Chef::Resource::Cat.new("loulou") |
119 | | - node = Chef::Node.new |
120 | | - node.name("Intel") |
121 | | - node.operatingsystem("Darwin") |
122 | | - node.operatingsystemversion("9.2.2") |
123 | | - node.macosx_productname("Mac OS X") |
124 | | - Chef::Platform.set( |
125 | | - :platform => :mac_os_x, |
126 | | - :resource => :cat, |
127 | | - :provider => "bourbon" |
128 | | - ) |
129 | | - Chef::Platform.find_provider_for_node(node, kitty).should eql("bourbon") |
130 | | - end |
131 | | - |
132 | | - it "should prefer lsbdistrelease over operatingsystem when looking up via node" do |
133 | | - kitty = Chef::Resource::Cat.new("loulou") |
134 | | - node = Chef::Node.new |
135 | | - node.name("Intel") |
136 | | - node.operatingsystem("Darwin") |
137 | | - node.operatingsystemversion("9.2.2") |
138 | | - node.lsbdistrelease("10") |
139 | | - Chef::Platform.set( |
140 | | - :platform => :darwin, |
141 | | - :version => "10", |
142 | | - :resource => :cat, |
143 | | - :provider => "bourbon" |
144 | | - ) |
145 | | - Chef::Platform.find_provider_for_node(node, kitty).should eql("bourbon") |
146 | | - end |
147 | | - |
148 | | - it "should prefer macosx_productversion over operatingsystem when looking up via node" do |
149 | | - kitty = Chef::Resource::Cat.new("loulou") |
150 | | - node = Chef::Node.new |
151 | | - node.name("Intel") |
152 | | - node.operatingsystem("Darwin") |
153 | | - node.operatingsystemversion("9.2.2") |
154 | | - node.macosx_productversion("10") |
155 | | - Chef::Platform.set( |
156 | | - :platform => :darwin, |
157 | | - :version => "10", |
158 | | - :resource => :cat, |
159 | | - :provider => "bourbon" |
160 | | - ) |
161 | | - Chef::Platform.find_provider_for_node(node, kitty).should eql("bourbon") |
162 | | - end |
163 | | - |
164 | 102 | it "should update the provider map with map" do |
165 | 103 | Chef::Platform.set( |
166 | 104 | :platform => :darwin, |
|
0 commit comments