This repository was archived by the owner on Jul 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -50,11 +50,15 @@ function Invoke-DockerTests {
50
50
}
51
51
52
52
$testReportPath = Join-Path $absoluteTestReportDir $TestReportName
53
+ $testReportExists = Test-Path - Path $testReportPath - PathType Leaf
54
+ if ($testReportExists ) {
55
+ $testResult = $ (ConvertFrom-Json $ (Get-Content $testReportPath ))
56
+ }
53
57
54
58
$result = [PSCustomObject ]@ {
55
59
# Todo: Need to check if the test report folder is missing.
56
60
# It should not crash when folder is not there, but should simply return nothing
57
- ' TestResult' = $ ( ConvertFrom-Json $ ( Get-Content $testReportPath ))
61
+ ' TestResult' = $testResult
58
62
' TestReportPath' = $testReportPath
59
63
' CommandResult' = $commandResult
60
64
' ImageName' = $ImageName
Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ Describe 'Run docker tests using Google Structure' {
9
9
10
10
Context ' Running structure tests' {
11
11
12
+ BeforeAll {
13
+ Invoke-DockerPull - ImageName ' ubuntu' - Tag ' latest'
14
+ }
15
+
12
16
BeforeEach {
13
17
$script :backupLocation = Get-Location
14
18
Set-Location $Global :TestDataDir
@@ -141,6 +145,7 @@ Describe 'Run docker tests using Google Structure' {
141
145
$testResult.Fail | Should - Be 0
142
146
$testResult.Results.Length | Should - Be 2
143
147
}
148
+
144
149
}
145
150
146
151
Context ' Pipeline execution' {
You can’t perform that action at this time.
0 commit comments