Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
munishchouhan committed Jun 11, 2024
1 parent 4859154 commit fd9ea32
Showing 1 changed file with 2 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ class DockerBuildStrategyTest extends Specification {
'--rm',
'--privileged',
'-v', '/work/foo:/work/foo',
'--name', 'build-1234',
'--entrypoint',
'buildctl-daemonless.sh',
'--name', 'build-1234',
'moby/buildkit:v0.13.2-rootless']

when:
Expand Down Expand Up @@ -121,32 +121,7 @@ class DockerBuildStrategyTest extends Specification {
'--platform', 'linux/amd64',
'--name', 'build-1234',
'moby/buildkit:v0.13.2-rootless',
'--dockerfile', '/work/foo/89fb83ce6ec8627b/Containerfile',
'--context', '/work/foo/89fb83ce6ec8627b/context',
'--destination', 'repo:89fb83ce6ec8627b',
'--cache=true',
'--custom-platform', 'linux/amd64',
'--cache-repo', 'reg.io/wave/build/cache' ]

cleanup:
ctx.close()
}

def 'should disable compress-caching' () {
given:
def ctx = ApplicationContext.run(['wave.build.compress-caching': false])
def service = ctx.getBean(DockerBuildStrategy)
and:
def req = new BuildRequest(
buildId: '1234',
workDir: Path.of('/work/foo/89fb83ce6ec8627b'),
platform: ContainerPlatform.of('linux/amd64'),
targetImage: 'repo:89fb83ce6ec8627b',
cacheRepository: 'reg.io/wave/build/cache' )
when:
def cmd = service.launchCmd(req)
then:
cmd == ['build',
'build',
'--frontend',
'dockerfile.v0',
'--local',
Expand Down

0 comments on commit fd9ea32

Please sign in to comment.