Skip to content

Commit

Permalink
chore(BuildDockerAndPublishImage): change unit test to use real life …
Browse files Browse the repository at this point in the history
…windows target platform
  • Loading branch information
smerle33 committed Sep 1, 2023
1 parent 27b297a commit 618fb39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/groovy/BuildDockerAndPublishImageStepTests.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ class BuildDockerAndPublishImageStepTests extends BaseTest {
withMocks{
script.call(testImageName, [
dockerBakeFile: 'bake.yml',
targetplatforms: 'windows/1804',
targetplatforms: 'windows/amd64',
agentLabels: 'docker-windows',
])
}
Expand Down Expand Up @@ -757,7 +757,7 @@ class BuildDockerAndPublishImageStepTests extends BaseTest {
mockPrincipalBranch()
withMocks{
script.call(testImageName, [
targetplatforms: 'windows/1804',
targetplatforms: 'windows/amd64',
])
}
printCallStack()
Expand All @@ -766,7 +766,7 @@ class BuildDockerAndPublishImageStepTests extends BaseTest {
assertJobStatusSuccess()

// And the error message is shown
assertTrue(assertMethodCallContainsPattern('echo', 'WARNING: The \'targetplatforms\' is set to \'windows/1804\', but there isn\'t any \'windows\' agent requested.'))
assertTrue(assertMethodCallContainsPattern('echo', 'WARNING: The \'targetplatforms\' is set to \'windows/amd64\', but there isn\'t any \'windows\' agent requested.'))
}

@Test
Expand Down

0 comments on commit 618fb39

Please sign in to comment.