chef-dk 0.12.0 → 0.13.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,20 +1,20 @@
1
- #
2
- # Copyright:: Copyright (c) 2014 Chef Software Inc.
3
- # License:: Apache License, Version 2.0
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
- #
17
-
18
- module ChefDK
19
- VERSION = "0.12.0"
20
- end
1
+ #
2
+ # Copyright:: Copyright (c) 2014 Chef Software Inc.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ module ChefDK
19
+ VERSION = "0.13.21"
20
+ end
@@ -96,9 +96,10 @@ module Kitchen
96
96
  # (see Base#run_command)
97
97
  def run_command
98
98
  level = config[:log_level] == :info ? :auto : config[:log_level]
99
- chef_client_bin = sudo(config[:chef_client_path])
99
+
100
+ cmd = "#{sudo(config[:chef_client_path])} --local-mode".
101
+ tap { |str| str.insert(0, "& ") if powershell_shell? }
100
102
 
101
- cmd = "#{chef_client_bin} --local-mode"
102
103
  args = [
103
104
  "--config #{config[:root_path]}/client.rb",
104
105
  "--log_level #{level}",
@@ -0,0 +1,11 @@
1
+ # Generated by "rake dependencies". Do not edit.
2
+ override :rubygems, version: "2.6.3"
3
+ override :bundler, version: "1.11.2"
4
+ override :libedit, version: "20130712-3.1"
5
+ override :libtool, version: "2.4.2"
6
+ override :libxslt, version: "1.1.28"
7
+ override :makedepend, version: "1.0.5"
8
+ override :ruby, version: "2.1.8"
9
+ override :"util-macros", version: "1.19.0"
10
+ override :xproto, version: "7.0.28"
11
+ override :zlib, version: "1.2.8"
@@ -1,325 +1,334 @@
1
- #
2
- # Copyright:: Copyright (c) 2014 Chef Software Inc.
3
- # License:: Apache License, Version 2.0
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
- #
17
-
18
- require 'spec_helper'
19
- require 'chef-dk/command/verify'
20
-
21
- module Gem
22
-
23
- # We stub Gem.ruby because `verify` uses it to locate the omnibus directory,
24
- # but we also use it in some of the "test commands" in these tests.
25
- class << self
26
- alias :real_ruby :ruby
27
- end
28
- end
29
-
30
- describe ChefDK::Command::Verify do
31
- let(:command_instance) { ChefDK::Command::Verify.new() }
32
-
33
- let(:command_options) { [] }
34
-
35
- let(:components) { {} }
36
-
37
- let(:default_components) do
38
- [
39
- "berkshelf",
40
- "test-kitchen",
41
- "tk-policyfile-provisioner",
42
- "chef-client",
43
- "chef-dk",
44
- "chef-provisioning",
45
- "chefspec",
46
- "generated-cookbooks-pass-chefspec",
47
- "rubocop",
48
- "fauxhai",
49
- "knife-spork",
50
- "kitchen-vagrant",
51
- "package installation",
52
- "openssl",
53
- "inspec"
54
- ]
55
- end
56
-
57
- def run_command(expected_exit_code)
58
- expect(command_instance.run(command_options)).to eq(expected_exit_code)
59
- end
60
-
61
- it "defines berks, tk, chef and chef-dk components by default" do
62
- expect(command_instance.components).not_to be_empty
63
- expect(command_instance.components.map(&:name)).to match_array(default_components)
64
- end
65
-
66
- it "has a usage banner" do
67
- expect(command_instance.banner).to eq("Usage: chef verify [component, ...] [options]")
68
- end
69
-
70
- describe "when locating omnibus directory" do
71
- it "should find omnibus app directory from ruby path" do
72
- allow(Gem).to receive(:ruby).and_return(File.join(fixtures_path, "eg_omnibus_dir/valid/embedded/bin/ruby"))
73
- expect(command_instance.omnibus_apps_dir).to include("eg_omnibus_dir/valid/embedded")
74
- end
75
-
76
- it "should raise OmnibusInstallNotFound if directory is not looking like omnibus" do
77
- allow(Gem).to receive(:ruby).and_return(File.join(fixtures_path,".rbenv/versions/2.1.1/bin/ruby"))
78
- expect{command_instance.omnibus_apps_dir}.to raise_error(ChefDK::OmnibusInstallNotFound)
79
- end
80
-
81
- it "raises OmnibusInstallNotFound if omnibus directory doesn't exist" do
82
- allow(Gem).to receive(:ruby).and_return(File.join(fixtures_path,"eg_omnibus_dir/missing_apps/embedded/bin/ruby"))
83
- expect{command_instance.omnibus_apps_dir}.to raise_error(ChefDK::OmnibusInstallNotFound)
84
- end
85
-
86
- it "raises MissingComponentError when a component doesn't exist" do
87
- allow(Gem).to receive(:ruby).and_return(File.join(fixtures_path,"eg_omnibus_dir/missing_component/embedded/bin/ruby"))
88
- expect{command_instance.validate_components!}.to raise_error(ChefDK::MissingComponentError)
89
- end
90
- end
91
-
92
- describe "when running verify command" do
93
- let(:stdout_io) { StringIO.new }
94
- let(:ruby_path) { File.join(fixtures_path, "eg_omnibus_dir/valid/embedded/bin/ruby") }
95
-
96
- def run_unit_test
97
- # Set rubyopt to empty to prevent bundler from infecting the ruby
98
- # subcommands (and loading a bunch of extra gems).
99
- lambda { |_self| sh("#{Gem.real_ruby} verify_me", env: { "RUBYOPT" => ""}) }
100
- end
101
-
102
- def run_integration_test
103
- lambda { |_self| sh("#{Gem.real_ruby} integration_test", env: { "RUBYOPT" => ""}) }
104
- end
105
-
106
- let(:all_tests_ok) do
107
- ChefDK::ComponentTest.new("successful_comp").tap do |c|
108
- c.base_dir = "berkshelf"
109
- c.unit_test(&run_unit_test)
110
- c.integration_test(&run_integration_test)
111
- c.smoke_test { sh("exit 0") }
112
- end
113
- end
114
-
115
- let(:all_tests_ok_2) do
116
- ChefDK::ComponentTest.new("successful_comp_2").tap do |c|
117
- c.base_dir = "test-kitchen"
118
- c.unit_test(&run_unit_test)
119
- c.smoke_test { sh("exit 0") }
120
- end
121
- end
122
-
123
- let(:failing_unit_test) do
124
- ChefDK::ComponentTest.new("failing_comp").tap do |c|
125
- c.base_dir = "chef"
126
- c.unit_test(&run_unit_test)
127
- c.smoke_test { sh("exit 0") }
128
- end
129
- end
130
-
131
- let(:passing_smoke_test_only) do
132
- component = failing_unit_test.dup
133
- component.smoke_test { sh("exit 0") }
134
- component
135
- end
136
-
137
- let(:failing_smoke_test_only) do
138
- component = all_tests_ok.dup
139
- component.smoke_test { sh("exit 1") }
140
- component
141
- end
142
-
143
- let(:component_without_integration_tests) do
144
- ChefDK::ComponentTest.new("successful_comp").tap do |c|
145
- c.base_dir = "berkshelf"
146
- c.unit_test { sh("./verify_me") }
147
- c.smoke_test { sh("exit 0") }
148
- end
149
- end
150
-
151
- def stdout
152
- stdout_io.string
153
- end
154
-
155
- before do
156
- allow(Gem).to receive(:ruby).and_return(ruby_path)
157
- allow(command_instance).to receive(:stdout).and_return(stdout_io)
158
- allow(command_instance).to receive(:components).and_return(components)
159
- end
160
-
161
- context "when running smoke tests only" do
162
- describe "with single command with success" do
163
- let(:components) do
164
- [ passing_smoke_test_only ]
165
- end
166
-
167
- before do
168
- run_command(0)
169
- end
170
-
171
- it "should report the success of the command" do
172
- expect(stdout).to include("Verification of component 'failing_comp' succeeded.")
173
- end
174
-
175
- end
176
-
177
- describe "with single command with failure" do
178
- let(:components) do
179
- [ failing_smoke_test_only ]
180
- end
181
-
182
- before do
183
- run_command(1)
184
- end
185
-
186
- it "should report the failure of the command" do
187
- expect(stdout).to include("Verification of component 'successful_comp' failed.")
188
- end
189
-
190
- end
191
- end
192
-
193
- context "when running unit tests" do
194
-
195
- let(:command_options) { %w{--unit --verbose} }
196
-
197
- let(:components) do
198
- [ all_tests_ok ]
199
- end
200
-
201
- describe "with single command with success" do
202
- before do
203
- run_command(0)
204
- end
205
-
206
- it "should have embedded/bin on the PATH" do
207
- expect(stdout).to include(File.join(fixtures_path, "eg_omnibus_dir/valid/embedded/bin"))
208
- end
209
-
210
- it "should report the success of the command" do
211
- expect(stdout).to include("Verification of component 'successful_comp' succeeded.")
212
- end
213
-
214
- it "reports the component test output" do
215
- expect(stdout).to include("you are good to go...")
216
- end
217
-
218
- context "and --verbose is not enabled" do
219
-
220
- let(:command_options) { %w{--unit} }
221
-
222
- it "omits the component test output" do
223
- expect(stdout).to_not include("you are good to go...")
224
- end
225
- end
226
-
227
- context "and --integration flag is given" do
228
-
229
- let(:command_options) { %w{--integration --verbose} }
230
-
231
- it "should run the integration command also" do
232
- expect(stdout).to include("integration tests OK")
233
- end
234
-
235
- context "and no integration test command is specifed for the component" do
236
-
237
- let(:components) do
238
- [ component_without_integration_tests ]
239
- end
240
-
241
- it "skips the integration test and succeeds" do
242
- expect(stdout).to include("Verification of component 'successful_comp' succeeded.")
243
- end
244
-
245
- end
246
-
247
- end
248
-
249
- end
250
-
251
- describe "with single command with failure" do
252
- let(:components) do
253
- [ failing_unit_test ]
254
- end
255
-
256
- before do
257
- run_command(1)
258
- end
259
-
260
- it "should report the failure of the command" do
261
- expect(stdout).to include("Verification of component 'failing_comp' failed.")
262
- end
263
-
264
- it "reports the component test output" do
265
- expect(stdout).to include("i'm not feeling good today...")
266
- end
267
- end
268
-
269
- describe "with multiple commands with success" do
270
- let(:components) do
271
- [ all_tests_ok, all_tests_ok_2 ]
272
- end
273
-
274
- before do
275
- run_command(0)
276
- end
277
-
278
- it "should report the success of the command" do
279
- expect(stdout).to include("Verification of component 'successful_comp' succeeded.")
280
- expect(stdout).to include("Verification of component 'successful_comp_2' succeeded.")
281
- end
282
-
283
- it "reports the component test outputs" do
284
- expect(stdout).to include("you are good to go...")
285
- expect(stdout).to include("my friend everything is good...")
286
- end
287
-
288
- context "and components are filtered by CLI args" do
289
-
290
- let(:command_options) { [ "successful_comp_2" ] }
291
-
292
- it "verifies only the desired component" do
293
- expect(stdout).to_not include("Verification of component 'successful_comp_1' succeeded.")
294
- expect(stdout).to include("Verification of component 'successful_comp_2' succeeded.")
295
- end
296
-
297
- end
298
- end
299
-
300
- describe "with multiple commands with failures" do
301
- let(:components) do
302
- [ all_tests_ok, all_tests_ok_2, failing_unit_test ]
303
- end
304
-
305
- before do
306
- run_command(1)
307
- end
308
-
309
- it "should report the success and failure of the commands" do
310
- expect(stdout).to include("Verification of component 'successful_comp' succeeded.")
311
- expect(stdout).to include("Verification of component 'successful_comp_2' succeeded.")
312
- expect(stdout).to include("Verification of component 'failing_comp' failed.")
313
- end
314
-
315
- it "reports the component test outputs" do
316
- expect(stdout).to include("you are good to go...")
317
- expect(stdout).to include("my friend everything is good...")
318
- expect(stdout).to include("i'm not feeling good today...")
319
- end
320
- end
321
-
322
- end
323
- end
324
-
325
- end
1
+ #
2
+ # Copyright:: Copyright (c) 2014 Chef Software Inc.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ require 'spec_helper'
19
+ require 'chef-dk/command/verify'
20
+
21
+ module Gem
22
+
23
+ # We stub Gem.ruby because `verify` uses it to locate the omnibus directory,
24
+ # but we also use it in some of the "test commands" in these tests.
25
+ class << self
26
+ alias :real_ruby :ruby
27
+ end
28
+ end
29
+
30
+ describe ChefDK::Command::Verify do
31
+ let(:command_instance) { ChefDK::Command::Verify.new() }
32
+
33
+ let(:command_options) { [] }
34
+
35
+ let(:components) { {} }
36
+
37
+ let(:default_components) do
38
+ [
39
+ "berkshelf",
40
+ "test-kitchen",
41
+ "tk-policyfile-provisioner",
42
+ "chef-client",
43
+ "chef-dk",
44
+ "chef-provisioning",
45
+ "chefspec",
46
+ "generated-cookbooks-pass-chefspec",
47
+ "rubocop",
48
+ "fauxhai",
49
+ "knife-spork",
50
+ "kitchen-vagrant",
51
+ "package installation",
52
+ "openssl",
53
+ "inspec"
54
+ ]
55
+ end
56
+
57
+ def run_command(expected_exit_code)
58
+ expect(command_instance.run(command_options)).to eq(expected_exit_code)
59
+ end
60
+
61
+ it "defines berks, tk, chef and chef-dk components by default" do
62
+ expect(command_instance.components).not_to be_empty
63
+ expect(command_instance.components.map(&:name)).to match_array(default_components)
64
+ end
65
+
66
+ it "has a usage banner" do
67
+ expect(command_instance.banner).to eq("Usage: chef verify [component, ...] [options]")
68
+ end
69
+
70
+ describe "when locating omnibus directory" do
71
+ it "should find omnibus app directory from ruby path" do
72
+ allow(Gem).to receive(:ruby).and_return(File.join(fixtures_path, "eg_omnibus_dir/valid/embedded/bin/ruby"))
73
+ expect(command_instance.omnibus_apps_dir).to include("eg_omnibus_dir/valid/embedded")
74
+ end
75
+
76
+ it "should raise OmnibusInstallNotFound if directory is not looking like omnibus" do
77
+ allow(Gem).to receive(:ruby).and_return(File.join(fixtures_path,".rbenv/versions/2.1.1/bin/ruby"))
78
+ expect{command_instance.omnibus_apps_dir}.to raise_error(ChefDK::OmnibusInstallNotFound)
79
+ end
80
+
81
+ it "raises OmnibusInstallNotFound if omnibus directory doesn't exist" do
82
+ allow(Gem).to receive(:ruby).and_return(File.join(fixtures_path,"eg_omnibus_dir/missing_apps/embedded/bin/ruby"))
83
+ expect{command_instance.omnibus_apps_dir}.to raise_error(ChefDK::OmnibusInstallNotFound)
84
+ end
85
+
86
+ context "and a component's gem is not installed" do
87
+ before do
88
+ component_map = ChefDK::Command::Verify.component_map.dup
89
+ component_map["cucumber"] = ChefDK::ComponentTest.new("cucumber")
90
+ component_map["cucumber"].gem_base_dir = "cucumber"
91
+ allow(ChefDK::Command::Verify).to receive(:component_map).and_return(component_map)
92
+ end
93
+
94
+ it "raises MissingComponentError when a component doesn't exist" do
95
+ allow(Gem).to receive(:ruby).and_return(File.join(fixtures_path,"eg_omnibus_dir/missing_component/embedded/bin/ruby"))
96
+ expect{command_instance.validate_components!}.to raise_error(ChefDK::MissingComponentError)
97
+ end
98
+ end
99
+ end
100
+
101
+ describe "when running verify command" do
102
+ let(:stdout_io) { StringIO.new }
103
+ let(:ruby_path) { File.join(fixtures_path, "eg_omnibus_dir/valid/embedded/bin/ruby") }
104
+
105
+ def run_unit_test
106
+ # Set rubyopt to empty to prevent bundler from infecting the ruby
107
+ # subcommands (and loading a bunch of extra gems).
108
+ lambda { |_self| sh("#{Gem.real_ruby} verify_me", env: { "RUBYOPT" => ""}) }
109
+ end
110
+
111
+ def run_integration_test
112
+ lambda { |_self| sh("#{Gem.real_ruby} integration_test", env: { "RUBYOPT" => ""}) }
113
+ end
114
+
115
+ let(:all_tests_ok) do
116
+ ChefDK::ComponentTest.new("successful_comp").tap do |c|
117
+ c.base_dir = "berkshelf"
118
+ c.unit_test(&run_unit_test)
119
+ c.integration_test(&run_integration_test)
120
+ c.smoke_test { sh("exit 0") }
121
+ end
122
+ end
123
+
124
+ let(:all_tests_ok_2) do
125
+ ChefDK::ComponentTest.new("successful_comp_2").tap do |c|
126
+ c.base_dir = "test-kitchen"
127
+ c.unit_test(&run_unit_test)
128
+ c.smoke_test { sh("exit 0") }
129
+ end
130
+ end
131
+
132
+ let(:failing_unit_test) do
133
+ ChefDK::ComponentTest.new("failing_comp").tap do |c|
134
+ c.base_dir = "chef"
135
+ c.unit_test(&run_unit_test)
136
+ c.smoke_test { sh("exit 0") }
137
+ end
138
+ end
139
+
140
+ let(:passing_smoke_test_only) do
141
+ component = failing_unit_test.dup
142
+ component.smoke_test { sh("exit 0") }
143
+ component
144
+ end
145
+
146
+ let(:failing_smoke_test_only) do
147
+ component = all_tests_ok.dup
148
+ component.smoke_test { sh("exit 1") }
149
+ component
150
+ end
151
+
152
+ let(:component_without_integration_tests) do
153
+ ChefDK::ComponentTest.new("successful_comp").tap do |c|
154
+ c.base_dir = "berkshelf"
155
+ c.unit_test { sh("./verify_me") }
156
+ c.smoke_test { sh("exit 0") }
157
+ end
158
+ end
159
+
160
+ def stdout
161
+ stdout_io.string
162
+ end
163
+
164
+ before do
165
+ allow(Gem).to receive(:ruby).and_return(ruby_path)
166
+ allow(command_instance).to receive(:stdout).and_return(stdout_io)
167
+ allow(command_instance).to receive(:components).and_return(components)
168
+ end
169
+
170
+ context "when running smoke tests only" do
171
+ describe "with single command with success" do
172
+ let(:components) do
173
+ [ passing_smoke_test_only ]
174
+ end
175
+
176
+ before do
177
+ run_command(0)
178
+ end
179
+
180
+ it "should report the success of the command" do
181
+ expect(stdout).to include("Verification of component 'failing_comp' succeeded.")
182
+ end
183
+
184
+ end
185
+
186
+ describe "with single command with failure" do
187
+ let(:components) do
188
+ [ failing_smoke_test_only ]
189
+ end
190
+
191
+ before do
192
+ run_command(1)
193
+ end
194
+
195
+ it "should report the failure of the command" do
196
+ expect(stdout).to include("Verification of component 'successful_comp' failed.")
197
+ end
198
+
199
+ end
200
+ end
201
+
202
+ context "when running unit tests" do
203
+
204
+ let(:command_options) { %w{--unit --verbose} }
205
+
206
+ let(:components) do
207
+ [ all_tests_ok ]
208
+ end
209
+
210
+ describe "with single command with success" do
211
+ before do
212
+ run_command(0)
213
+ end
214
+
215
+ it "should have embedded/bin on the PATH" do
216
+ expect(stdout).to include(File.join(fixtures_path, "eg_omnibus_dir/valid/embedded/bin"))
217
+ end
218
+
219
+ it "should report the success of the command" do
220
+ expect(stdout).to include("Verification of component 'successful_comp' succeeded.")
221
+ end
222
+
223
+ it "reports the component test output" do
224
+ expect(stdout).to include("you are good to go...")
225
+ end
226
+
227
+ context "and --verbose is not enabled" do
228
+
229
+ let(:command_options) { %w{--unit} }
230
+
231
+ it "omits the component test output" do
232
+ expect(stdout).to_not include("you are good to go...")
233
+ end
234
+ end
235
+
236
+ context "and --integration flag is given" do
237
+
238
+ let(:command_options) { %w{--integration --verbose} }
239
+
240
+ it "should run the integration command also" do
241
+ expect(stdout).to include("integration tests OK")
242
+ end
243
+
244
+ context "and no integration test command is specifed for the component" do
245
+
246
+ let(:components) do
247
+ [ component_without_integration_tests ]
248
+ end
249
+
250
+ it "skips the integration test and succeeds" do
251
+ expect(stdout).to include("Verification of component 'successful_comp' succeeded.")
252
+ end
253
+
254
+ end
255
+
256
+ end
257
+
258
+ end
259
+
260
+ describe "with single command with failure" do
261
+ let(:components) do
262
+ [ failing_unit_test ]
263
+ end
264
+
265
+ before do
266
+ run_command(1)
267
+ end
268
+
269
+ it "should report the failure of the command" do
270
+ expect(stdout).to include("Verification of component 'failing_comp' failed.")
271
+ end
272
+
273
+ it "reports the component test output" do
274
+ expect(stdout).to include("i'm not feeling good today...")
275
+ end
276
+ end
277
+
278
+ describe "with multiple commands with success" do
279
+ let(:components) do
280
+ [ all_tests_ok, all_tests_ok_2 ]
281
+ end
282
+
283
+ before do
284
+ run_command(0)
285
+ end
286
+
287
+ it "should report the success of the command" do
288
+ expect(stdout).to include("Verification of component 'successful_comp' succeeded.")
289
+ expect(stdout).to include("Verification of component 'successful_comp_2' succeeded.")
290
+ end
291
+
292
+ it "reports the component test outputs" do
293
+ expect(stdout).to include("you are good to go...")
294
+ expect(stdout).to include("my friend everything is good...")
295
+ end
296
+
297
+ context "and components are filtered by CLI args" do
298
+
299
+ let(:command_options) { [ "successful_comp_2" ] }
300
+
301
+ it "verifies only the desired component" do
302
+ expect(stdout).to_not include("Verification of component 'successful_comp_1' succeeded.")
303
+ expect(stdout).to include("Verification of component 'successful_comp_2' succeeded.")
304
+ end
305
+
306
+ end
307
+ end
308
+
309
+ describe "with multiple commands with failures" do
310
+ let(:components) do
311
+ [ all_tests_ok, all_tests_ok_2, failing_unit_test ]
312
+ end
313
+
314
+ before do
315
+ run_command(1)
316
+ end
317
+
318
+ it "should report the success and failure of the commands" do
319
+ expect(stdout).to include("Verification of component 'successful_comp' succeeded.")
320
+ expect(stdout).to include("Verification of component 'successful_comp_2' succeeded.")
321
+ expect(stdout).to include("Verification of component 'failing_comp' failed.")
322
+ end
323
+
324
+ it "reports the component test outputs" do
325
+ expect(stdout).to include("you are good to go...")
326
+ expect(stdout).to include("my friend everything is good...")
327
+ expect(stdout).to include("i'm not feeling good today...")
328
+ end
329
+ end
330
+
331
+ end
332
+ end
333
+
334
+ end