GoogleContainerTools/skaffold · error
verify test failed
Error message
verify test failed
What it means
The verification container ran to completion but exited with a failure (or errored during its wait), so the verify test case is marked failed with 'verify test failed'. The wrapped containerErr contains the container's exit status/logs context.
Source
Thrown at pkg/skaffold/verify/docker/verify.go:294
containerErr = err
}
case status := <-statusCh:
if status.StatusCode != 0 {
containerErr = errors.New(fmt.Sprintf("%q running container image %q errored during run with status code: %d", opts.VerifyTestName, opts.ContainerConfig.Image, status.StatusCode))
}
case <-v.timeout(timeoutDuration):
// verify test timed out
containerErr = errors.New(fmt.Sprintf("%q running container image %q timed out after : %v", opts.VerifyTestName, opts.ContainerConfig.Image, *timeoutDuration))
v.client.Stop(ctx, id, util.Ptr(time.Second*0))
err := v.client.Remove(ctx, id)
if err != nil {
return errors.Wrap(containerErr, err.Error())
}
}
if containerErr != nil {
eventV2.VerifyFailed(tc.Name, containerErr)
return errors.Wrap(containerErr, "verify test failed")
}
eventV2.VerifySucceeded(opts.VerifyTestName)
return nil
}
func (v *Verifier) containerConfigFromImage(ctx context.Context, taggedImage string) (*container.Config, error) {
ociConfig, _, err := v.client.ImageInspectWithRaw(ctx, taggedImage)
if err != nil {
return nil, err
}
return dockerutil.OCIImageConfigToContainerConfig(taggedImage, ociConfig.Config), nil
}
func (v *Verifier) getContainerName(ctx context.Context, imageName string, containerName string) string {
name := containerName
// If no container name is provided, derive it from the image nameView on GitHub (pinned to a1189de023)
Solutions
- Read container logs (`docker logs <container>`) to see the test failure output
- Fix the failing test or its configuration inside the verify container
- Check resource limits/OOM kills via `docker inspect` exit code (137 = SIGKILL/OOM)
- Verify network/service dependencies the test needs are running and reachable
Example fix
// before: wrong command path in verify container command: ["/bin/run-tests.sh"] // after command: ["/app/run-tests.sh"]
Defensive patterns
Strategy: try-catch
Validate before calling
// Smoke-test the verify command locally first
if err := exec.Command("docker", "run", "--rm", verifyImage, testCommand...).Run(); err != nil {
return fmt.Errorf("verify command fails in container: %w", err)
} Try / catch
if err := verifier.Verify(ctx, out, tc); err != nil {
if strings.Contains(err.Error(), "verify test failed") {
// fetch logs for diagnostics
exec.Command("docker", "logs", containerName).Run()
return fmt.Errorf("verify test %s failed: %w", tc.Name, err)
}
return err
} Prevention
- Run verify test commands in plain docker before wiring them into skaffold
- Set sane memory limits to avoid OOM kills (exit 137)
- Ensure the test's dependencies (services, env) are reachable from the container network
When it happens
Trigger: createAndRunContainer waits on the container status channel and containerErr is non-nil — the container exited non-zero or failed during execution, after successful creation.
Common situations: The test binary inside the container exits non-zero; container killed by OOM; command in the verify container not found; test depends on a service that isn't reachable from the container.
Related errors
- %q running container image %q errored during run with status
- %q running container image %q timed out after : %v
- creating skaffold network %s: %w
- getting imageID for %q: %w
- failed to remove old container %s for image %s: %w
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/2d005e81be26c1ad.
Report an issue: GitHub.