{"record":{"id":"2d005e81be26c1ad","repo":"GoogleContainerTools/skaffold","slug":"verify-test-failed","errorCode":null,"errorMessage":"verify test failed","messagePattern":"verify test failed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/verify/docker/verify.go","lineNumber":294,"sourceCode":"\t\t\tcontainerErr = err\n\t\t}\n\tcase status := <-statusCh:\n\t\tif status.StatusCode != 0 {\n\t\t\tcontainerErr = errors.New(fmt.Sprintf(\"%q running container image %q errored during run with status code: %d\", opts.VerifyTestName, opts.ContainerConfig.Image, status.StatusCode))\n\t\t}\n\tcase <-v.timeout(timeoutDuration):\n\t\t// verify test timed out\n\t\tcontainerErr = errors.New(fmt.Sprintf(\"%q running container image %q timed out after : %v\", opts.VerifyTestName, opts.ContainerConfig.Image, *timeoutDuration))\n\t\tv.client.Stop(ctx, id, util.Ptr(time.Second*0))\n\t\terr := v.client.Remove(ctx, id)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(containerErr, err.Error())\n\t\t}\n\t}\n\n\tif containerErr != nil {\n\t\teventV2.VerifyFailed(tc.Name, containerErr)\n\t\treturn errors.Wrap(containerErr, \"verify test failed\")\n\t}\n\n\teventV2.VerifySucceeded(opts.VerifyTestName)\n\treturn nil\n}\n\nfunc (v *Verifier) containerConfigFromImage(ctx context.Context, taggedImage string) (*container.Config, error) {\n\tociConfig, _, err := v.client.ImageInspectWithRaw(ctx, taggedImage)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn dockerutil.OCIImageConfigToContainerConfig(taggedImage, ociConfig.Config), nil\n}\n\nfunc (v *Verifier) getContainerName(ctx context.Context, imageName string, containerName string) string {\n\tname := containerName\n\n\t// If no container name is provided, derive it from the image name","sourceCodeStart":276,"sourceCodeEnd":312,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/verify/docker/verify.go#L276-L312","documentation":"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.","triggerScenarios":"createAndRunContainer waits on the container status channel and containerErr is non-nil — the container exited non-zero or failed during execution, after successful creation.","commonSituations":"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.","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"],"exampleFix":"// before: wrong command path in verify container\ncommand: [\"/bin/run-tests.sh\"]\n// after\ncommand: [\"/app/run-tests.sh\"]","handlingStrategy":"try-catch","validationCode":"// Smoke-test the verify command locally first\nif err := exec.Command(\"docker\", \"run\", \"--rm\", verifyImage, testCommand...).Run(); err != nil {\n    return fmt.Errorf(\"verify command fails in container: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"if err := verifier.Verify(ctx, out, tc); err != nil {\n    if strings.Contains(err.Error(), \"verify test failed\") {\n        // fetch logs for diagnostics\n        exec.Command(\"docker\", \"logs\", containerName).Run()\n        return fmt.Errorf(\"verify test %s failed: %w\", tc.Name, err)\n    }\n    return err\n}","preventionTips":["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"],"tags":["docker","verify","test-failure","exit-code"],"backgroundTag":"verify-test-failed","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}