serverspec-runner 1.3.5 → 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/Rakefile +7 -0
- data/bin/serverspec-runner +30 -26
- data/lib/serverspec-runner/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95214931bd6fe3c15da86173962af41207536632933cf17b34b4de732e2c92e1
|
4
|
+
data.tar.gz: 9d37ddc59b12c92a0e11952898aab65fd7fe9ebadcf7d4b9b9084610cc435ae6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bdfe0bcc4ec3cdf22081217c055644f44511943a723f832b256d8940bc0d52faf68dbb327c65f6237b35774e2cfa30bac869c42f8b982bf9b9a77f9a78ed9fb
|
7
|
+
data.tar.gz: d8c155efdb66b9561c91128bf7ec4c2ab7fc53b995fb9db3ce6b940ae1dcfc99808dca7bd0b773ff2174f80bfaee6f76578a01677ece8c39c370c2433348b7d8
|
data/.travis.yml
CHANGED
data/Rakefile
CHANGED
@@ -213,6 +213,8 @@ namespace :spec do
|
|
213
213
|
gen_exec_plan(nil, scenarios, [], ssh_options, tasks, platform)
|
214
214
|
|
215
215
|
task :stdout do
|
216
|
+
ENV['is_example_error'] = 'true' if CSV.foreach(csv_file).any? { |c| c.size > 1 && c[1] == 'NG' }
|
217
|
+
|
216
218
|
if ENV['tableformat'] == 'none'
|
217
219
|
elsif ENV['tableformat'] == 'bool'
|
218
220
|
|
@@ -279,6 +281,10 @@ namespace :spec do
|
|
279
281
|
end
|
280
282
|
end
|
281
283
|
|
284
|
+
task :exit do
|
285
|
+
exit(1) if !ENV['ignore_error_exit'] && ENV['is_example_error']
|
286
|
+
end
|
287
|
+
|
282
288
|
exec_tasks = []
|
283
289
|
if ENV['parallels']
|
284
290
|
processes = ENV['parallels'].to_i
|
@@ -302,6 +308,7 @@ namespace :spec do
|
|
302
308
|
end
|
303
309
|
|
304
310
|
exec_tasks << :stdout
|
311
|
+
exec_tasks << :exit
|
305
312
|
task :all => exec_tasks
|
306
313
|
|
307
314
|
# tempファイルに書き出し
|
data/bin/serverspec-runner
CHANGED
@@ -11,20 +11,21 @@ raketask = 'spec'
|
|
11
11
|
showtasks = false
|
12
12
|
|
13
13
|
opts = GetoptLong.new(
|
14
|
-
["--scenario",
|
15
|
-
["--inventory",
|
16
|
-
["--specroot",
|
17
|
-
["--ssh_options",
|
18
|
-
["--explain",
|
19
|
-
["--tableformat",
|
20
|
-
["--parallel",
|
21
|
-
["--pattern",
|
22
|
-
["--exclude-pattern",
|
23
|
-
["--
|
24
|
-
["--
|
25
|
-
["--
|
26
|
-
["--
|
27
|
-
["--
|
14
|
+
["--scenario", "-s", GetoptLong::REQUIRED_ARGUMENT],
|
15
|
+
["--inventory", "-i", GetoptLong::REQUIRED_ARGUMENT],
|
16
|
+
["--specroot", "-r", GetoptLong::REQUIRED_ARGUMENT],
|
17
|
+
["--ssh_options", "-o", GetoptLong::REQUIRED_ARGUMENT],
|
18
|
+
["--explain", "-e", GetoptLong::REQUIRED_ARGUMENT],
|
19
|
+
["--tableformat", "-t", GetoptLong::REQUIRED_ARGUMENT],
|
20
|
+
["--parallel", "-p", GetoptLong::REQUIRED_ARGUMENT],
|
21
|
+
["--pattern", "-P", GetoptLong::REQUIRED_ARGUMENT],
|
22
|
+
["--exclude-pattern", "-E", GetoptLong::REQUIRED_ARGUMENT],
|
23
|
+
["--ignore-error-exit", "-I", GetoptLong::NO_ARGUMENT],
|
24
|
+
["--version", "-v", GetoptLong::NO_ARGUMENT],
|
25
|
+
["--help", "-h", GetoptLong::NO_ARGUMENT],
|
26
|
+
["--raketask", "-1", GetoptLong::REQUIRED_ARGUMENT],
|
27
|
+
["--tmpdir", "-2", GetoptLong::REQUIRED_ARGUMENT],
|
28
|
+
["--tasks", "-T", GetoptLong::NO_ARGUMENT]
|
28
29
|
)
|
29
30
|
|
30
31
|
opts.each do |opt, arg|
|
@@ -47,6 +48,8 @@ opts.each do |opt, arg|
|
|
47
48
|
ENV['pattern'] = arg
|
48
49
|
when '--exclude-pattern'
|
49
50
|
ENV['exclude_pattern'] = arg
|
51
|
+
when '--ignore-error-exit'
|
52
|
+
ENV['ignore_error_exit'] = 'true'
|
50
53
|
when '--tmpdir'
|
51
54
|
ENV['tmpdir'] = arg
|
52
55
|
when '--raketask'
|
@@ -58,18 +61,19 @@ opts.each do |opt, arg|
|
|
58
61
|
exit 0
|
59
62
|
else
|
60
63
|
puts "Usage: serverspec-runner (options)"
|
61
|
-
puts "-s, --scenario
|
62
|
-
puts "-i, --inventory
|
63
|
-
puts "-r, --specroot
|
64
|
-
puts "-o, --ssh_options
|
65
|
-
puts "-e, --explain
|
66
|
-
puts "-t, --tableformat
|
67
|
-
puts "-T, --tasks
|
68
|
-
puts "-p, --parallel
|
69
|
-
puts "-P, --pattern
|
70
|
-
puts "-
|
71
|
-
puts "-
|
72
|
-
puts "-
|
64
|
+
puts "-s, --scenario SCENARIO_FILE path to scenario yml file"
|
65
|
+
puts "-i, --inventory INVENTORY_FILE path to ansible inventory yml file"
|
66
|
+
puts "-r, --specroot SPEC_ROOT path to spec tests root dir"
|
67
|
+
puts "-o, --ssh_options SSH_OPTIONS_FILE path to ssh options yml file"
|
68
|
+
puts "-e, --explain (short|long) specify result explain length(default: short)"
|
69
|
+
puts "-t, --tableformat (aa|mkd|csv|bool|none) specify result table type(default: aa)"
|
70
|
+
puts "-T, --tasks display the tasks with descriptions(exec rake -T)"
|
71
|
+
puts "-p, --parallel execute tasks in parallel"
|
72
|
+
puts "-P, --pattern execute pattern in spec directory"
|
73
|
+
puts "-I, --ignore-error-exit exit with 0 even on error"
|
74
|
+
puts "-1, --raketask RAKE_TASK_NAME execute specified rake task only(ex: spec:test::anyhost-01)"
|
75
|
+
puts "-v, --version show version"
|
76
|
+
puts "-h, --help show help"
|
73
77
|
exit 0
|
74
78
|
end
|
75
79
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverspec-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hiracy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: serverspec
|
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
version: '0'
|
162
162
|
requirements: []
|
163
163
|
rubyforge_project:
|
164
|
-
rubygems_version: 2.7.
|
164
|
+
rubygems_version: 2.7.6
|
165
165
|
signing_key:
|
166
166
|
specification_version: 4
|
167
167
|
summary: simple execution framework for serverspec
|