kitchen-salt 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZmZkNDMxMWY5NGZmMWYzZTUxNDc3ZmJiYjk3NzJkYjUxMWYzNzI3Ng==
4
+ MTJlNTRiYmI5MmNjMTc4MGFlYjkwMmFlMTQ0ZDg4NWRiZmZhZDczZg==
5
5
  data.tar.gz: !binary |-
6
- MDM0NDFiOWIxMDgyODgwNTAyMmJkMzhmZTNiZjkzNDJmMTE5NGJkYw==
6
+ NDc5MGJkNjczOGMzYjFlMWRkMDhiMDk4MWRiN2UyMjJhNzk0NjY0Ng==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YzJiOGM1MmM5MTI1MmJiZTg5MjgwMjI2YTE5NDhkZWFjMTgwYWU1YmY4ODFk
10
- YTQ4NWFmMjg2YmU4OWVjYTg0MzhhYWYxNzFhYWZjZmUyMGUwYzRkYTkxMzBh
11
- MzRhNWI4NTA0MTAxMGNiM2ViMzFhNjIzYThlNzY4NzIwMGIxMjY=
9
+ M2E2YmFlZTg0NDZiZjUyZGQzOWMyZGM1ODJiOTRjNjNhYjQyMzdkYzNkNDI4
10
+ YmMzOTM5Y2Y2ZDczZTRjNzEyM2JiMjU0NmUwNTkxYzEzM2E4YzE1YjZmZmU4
11
+ Zjk4NjlhNmQ4YTQwOTlhZDgxMWRkODJiMWExNDg1Y2YyMDFiMGY=
12
12
  data.tar.gz: !binary |-
13
- MzI3NmEzZTA3MDcxZWU1NWIyMjQwMWZiNjQ3ODY2ODk5NTkxNDMwYzNiOGIw
14
- NzE2N2Q2NjM4NjI4YzkxOTY0ZGE1M2E4YjNkMjVjNjcwZjAyN2MxZjkwMjkw
15
- NjkyOGUzNWM0MTU0ZGU3Mjg4MmZiNTliYWNlYjk2NDk5Y2RhNjk=
13
+ NTg4ZWJkYTAwN2IwYTljZTNlOGE1Yjk1ZjcwMzE3MDlkODJlYTMxMGFkOWYy
14
+ NDkwYzg3Zjc5MjNkY2YwYmY0MmM5MjljNzM5NTU4NWM5ZDcwM2FiMGE1ZTA0
15
+ OGUzOTk2NDQ4NmZjMjhhYTJhMmY0MWUyNGRkMmVhZTUzNTNmNDU=
@@ -1,5 +1,5 @@
1
1
  module Kitchen
2
2
  module Salt
3
- VERSION = "0.0.12"
3
+ VERSION = "0.0.13"
4
4
  end
5
5
  end
@@ -53,7 +53,7 @@ module Kitchen
53
53
  default_config :salt_run_highstate, true
54
54
 
55
55
  # salt-call version that supports the undocumented --retcode-passthrough command
56
- RETCODE_VERSION = '0.17.5'
56
+ RETCODE_VERSION = '2014.2.0'
57
57
 
58
58
  def install_command
59
59
  debug(diagnose())
@@ -167,12 +167,17 @@ module Kitchen
167
167
 
168
168
  cmd << " --log-level=#{config[:log_level]}"
169
169
 
170
- # config[:salt_version] can be 'latest' or 'x.y.z'
171
- if config[:salt_version] >= RETCODE_VERSION
170
+ # config[:salt_version] can be 'latest' or 'x.y.z', 'YYYY.M.x' etc
171
+ # error return codes are a mess in salt:
172
+ # https://github.com/saltstack/salt/pull/11337
173
+ # Unless we know we have a version that supports --retcode-passthrough
174
+ # attempt to scan the output for signs of failure
175
+ if config[:salt_version] > RETCODE_VERSION && config[:salt_version] != 'latest'
176
+ # hope for the best and hope it works eventually
172
177
  cmd = cmd + " --retcode-passthrough"
173
178
  else
174
- # grep the output for ERROR or CRITICAL & return a 1 on finding a problem
175
- fail_grep = 'grep -e ERROR -e CRITICAL'
179
+ # scan the output for signs of failure, there is a risk of false negatives
180
+ fail_grep = 'grep Result.*False'
176
181
  cmd << " 2>&1 | tee /tmp/salt-call-output ; (sed '/#{fail_grep}/d' /tmp/salt-call-output | #{fail_grep} ; EC=$? ; [ ${EC} -eq 0 ] && exit 1 ; [ ${EC} -eq 1 ] && exit 0)"
177
182
  end
178
183
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-salt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon McCartney
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-25 00:00:00.000000000 Z
11
+ date: 2014-03-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: salt provisioner for test-kitchen
14
14
  email: