Skip to content

Commit

Permalink
[release] fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <[email protected]>
  • Loading branch information
pditommaso committed Sep 25, 2022
1 parent 750b2de commit 37f5baa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ class RedisContainerTokenControllerTest extends Specification implements RedisTe
noExceptionThrown()

and:
new JsonSlurper().parseText(jedisPool.resource.get("wave-tokens:"+body.containerToken)).platform.arch == 'arm64'
new JsonSlurper().parseText(jedisPool.resource.get("wave-tokens:"+body.containerToken)).workspaceId == 10
new JsonSlurper().parseText(jedisPool.resource.get("wave-tokens:"+body.containerToken)).containerImage == 'ubuntu:latest'
new JsonSlurper().parseText(jedisPool.resource.get("wave-tokens/v0:"+body.containerToken)).platform.arch == 'arm64'
new JsonSlurper().parseText(jedisPool.resource.get("wave-tokens/v0:"+body.containerToken)).workspaceId == 10
new JsonSlurper().parseText(jedisPool.resource.get("wave-tokens/v0:"+body.containerToken)).containerImage == 'ubuntu:latest'
}

def 'should not retrieve an expired build request' () {
Expand All @@ -82,7 +82,7 @@ class RedisContainerTokenControllerTest extends Specification implements RedisTe
noExceptionThrown()

when:
jedisPool.resource.del("wave-tokens:"+body.containerToken)
jedisPool.resource.del("wave-tokens/v0:"+body.containerToken)

and:
RouteHandler routeHelper = applicationContext.getBean(RouteHandler)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ class RedisRegistryControllerTest extends Specification implements DockerRegistr
given:
HttpClient client = applicationContext.createBean(HttpClient)
and:
jedisPool.resource.set("wave-tokens:1234", '{"containerImage":"hello-world"}')
jedisPool.resource.set("wave-build:hello-world", '{"containerImage":"hello-world"}')
jedisPool.resource.set("wave-tokens/v0:1234", '{"containerImage":"hello-world"}')
jedisPool.resource.set("wave-build/v0:hello-world", '{"containerImage":"hello-world"}')
when:
HttpRequest request = HttpRequest.GET("http://localhost:$port/v2/wt/1234/hello-world/manifests/latest").headers({h->
h.add('Accept', ContentType.DOCKER_MANIFEST_V2_TYPE)
Expand Down

0 comments on commit 37f5baa

Please sign in to comment.