Skip to content

Commit

Permalink
fixed container and inspect tests
Browse files Browse the repository at this point in the history
  • Loading branch information
munishchouhan committed Jun 5, 2024
1 parent cc90d46 commit b3cb5e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import groovy.transform.CompileStatic
import groovy.util.logging.Slf4j
import io.micronaut.context.annotation.Value
import io.micronaut.http.HttpResponse
import io.micronaut.http.annotation.Body
import io.micronaut.http.annotation.Controller
import io.micronaut.http.annotation.Post
import io.micronaut.scheduling.TaskExecutors
Expand Down Expand Up @@ -68,7 +69,7 @@ class InspectController {
private String serverUrl

@Post("/v1alpha1/inspect")
CompletableFuture<HttpResponse<ContainerInspectResponse>> inspect(ContainerInspectRequest req) {
CompletableFuture<HttpResponse<ContainerInspectResponse>> inspect(@Body ContainerInspectRequest req) {

if( !req.containerImage )
throw new BadRequestException("Missing 'containerImage' attribute")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,7 @@ class ContainerControllerTest extends Specification {
def controller = Spy(new ContainerController(freezeService: freeze, inclusionService: Mock(ContainerInclusionService)))
and:
def target = 'docker.io/repo/ubuntu:latest'
def BUILD = Mock(BuildRequest) {
getTargetImage() >> target
}
def BUILD = new BuildRequest (targetImage: target)
and:
def req = new SubmitContainerTokenRequest(containerImage: 'ubuntu:latest', freeze: true, buildRepository: 'docker.io/foo/bar')

Expand Down

0 comments on commit b3cb5e1

Please sign in to comment.