kitchen-pester 0.12.0 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/kitchen/verifier/pester.rb +24 -12
- data/lib/kitchen/verifier/pester_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: da53197e406192ac305bcdc54725ecd52787ee9b9bccff32e8438f7bd8f31796
|
4
|
+
data.tar.gz: 0c28027331124a37ce8dd730598b191a26f3e69df8b4240921eead3f289e7c52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bff325f80a68eb821aecd0d761c29e4caa5c6cb9bd2f738f13219d3c9c8496ee73d34b2dbaa6e41c44392971f85fce6387765a1c4c81a6e41a7801c42e2987ee
|
7
|
+
data.tar.gz: d1ad67092b11dc19c7d455a1b51c62a55d1aeb5aaed613526005f2f264710d8504de18a96b56fb27646304001f5cc661e9b8945d909c79a71b3f212275bd4f1a
|
data/Gemfile
CHANGED
@@ -115,8 +115,19 @@ module Kitchen
|
|
115
115
|
if Gem::Version.new(Kitchen::VERSION) <= Gem::Version.new("2.3.4")
|
116
116
|
def call(state)
|
117
117
|
super
|
118
|
-
|
118
|
+
ensure
|
119
|
+
download_test_files(state)
|
120
|
+
end
|
121
|
+
else
|
122
|
+
def call(state)
|
123
|
+
super
|
124
|
+
rescue
|
125
|
+
# If the verifier reports failure, we need to download the files ourselves.
|
126
|
+
# Test Kitchen's base verifier doesn't have the download in an `ensure` block.
|
119
127
|
download_test_files(state)
|
128
|
+
|
129
|
+
# Rethrow original exception, we still want to register the failure.
|
130
|
+
raise
|
120
131
|
end
|
121
132
|
end
|
122
133
|
|
@@ -130,7 +141,7 @@ module Kitchen
|
|
130
141
|
|
131
142
|
$options = New-PesterOption -TestSuiteName "Pester - #{instance.to_str}"
|
132
143
|
|
133
|
-
$result = Invoke-Pester -Script $TestPath -OutputFile $OutputFilePath -OutputFormat NUnitXml -PesterOption $
|
144
|
+
$result = Invoke-Pester -Script $TestPath -OutputFile $OutputFilePath -OutputFormat NUnitXml -PesterOption $options -PassThru
|
134
145
|
$result | Export-CliXml -Path (Join-Path -Path $TestPath -ChildPath 'result.xml')
|
135
146
|
|
136
147
|
$LASTEXITCODE = $result.FailedCount
|
@@ -225,11 +236,19 @@ module Kitchen
|
|
225
236
|
Import-Module -Name PsGet -Force -ErrorAction Stop
|
226
237
|
}
|
227
238
|
|
228
|
-
Install-Module -Name Pester
|
239
|
+
Install-Module -Name Pester -Force
|
229
240
|
}
|
230
241
|
catch {
|
231
242
|
Write-Host "Installing from Github"
|
232
|
-
|
243
|
+
|
244
|
+
$downloadFolder = if (Test-Path "$env:TEMP/PesterDownload") {
|
245
|
+
"$env:TEMP/PesterDownload"
|
246
|
+
}
|
247
|
+
else {
|
248
|
+
New-Item -ItemType Directory -Path "$env:TEMP/PesterDownload"
|
249
|
+
}
|
250
|
+
|
251
|
+
$zipFile = Join-Path (Get-Item -Path $downloadFolder).FullName -ChildPath "pester.zip"
|
233
252
|
|
234
253
|
if (-not (Test-Path $zipfile)) {
|
235
254
|
$source = 'https://github.com/pester/Pester/archive/4.10.1.zip'
|
@@ -294,14 +313,7 @@ module Kitchen
|
|
294
313
|
instance.transport.connection(state) do |conn|
|
295
314
|
config[:downloads].to_h.each do |remotes, local|
|
296
315
|
debug("Downloading #{Array(remotes).join(", ")} to #{local}")
|
297
|
-
|
298
|
-
Array(remotes).each do |file|
|
299
|
-
safe_name = instance.name.gsub(/[^0-9A-Z-]/i, "_")
|
300
|
-
local_path = File.join(local, safe_name, file)
|
301
|
-
remote_path = File.join(config[:root_path], file)
|
302
|
-
|
303
|
-
conn.download(remote_path, local_path)
|
304
|
-
end
|
316
|
+
conn.download(remotes, local)
|
305
317
|
end
|
306
318
|
end
|
307
319
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-pester
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Murawski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
|
-
rubygems_version: 3.0.
|
128
|
+
rubygems_version: 3.0.6
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Test-Kitchen verifier for Pester.
|