{"record":{"id":"74dd5379965331d7","repo":"GoogleContainerTools/skaffold","slug":"verify-command-expects-non-zero-number-of-test-cas","errorCode":null,"errorMessage":"verify command expects non-zero number of test cases","messagePattern":"verify command expects non-zero number of test cases","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/schema/validation/validation.go","lineNumber":402,"sourceCode":"\t\t}\n\t\tnetworkModeCfgErr := ErrorWithLocation{\n\t\t\tError:    networkModeErr,\n\t\t\tLocation: cfg.YAMLInfos.LocateField(cfg.Build.Artifacts[i].DockerArtifact, \"NetworkMode\"),\n\t\t}\n\t\tcfgErrs = append(cfgErrs, networkModeCfgErr)\n\t}\n\treturn\n}\n\n// Validate that test cases exist when `verify` is called, otherwise Skaffold should error\nfunc validateVerifyTestsExistOnVerifyCommand(runCtx *runcontext.RunContext) []error {\n\tvar errs []error\n\ttcs := []*latest.VerifyTestCase{}\n\tfor _, pipeline := range runCtx.GetPipelines() {\n\t\ttcs = append(tcs, pipeline.Verify...)\n\t}\n\tif len(tcs) == 0 && runCtx.Opts.Command == \"verify\" {\n\t\terrs = append(errs, errors.New(\"verify command expects non-zero number of test cases\"))\n\t}\n\treturn errs\n}\n\n// Validates that a Docker Container with a Network Mode \"container:<id|name>\" points to an actually running container\nfunc validateDockerNetworkContainerExists(ctx context.Context, artifacts []*latest.Artifact, runCtx docker.Config) []error {\n\tvar errs []error\n\tapiClient, err := docker.NewAPIClient(ctx, runCtx)\n\tif err != nil {\n\t\terrs = append(errs, err)\n\t\treturn errs\n\t}\n\n\tclient := apiClient.RawClient()\n\tctx, cancel := context.WithDeadline(ctx, time.Now().Add(5*time.Second))\n\tdefer cancel()\n\n\tfor _, a := range artifacts {","sourceCodeStart":384,"sourceCodeEnd":420,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/schema/validation/validation.go#L384-L420","documentation":"Skaffold's `verify` command runs verification test cases (containers that check deployed workloads). Before executing, schema validation checks that at least one `verify` test case is defined across all pipelines in skaffold.yaml. If the command is `verify` but `pipeline.Verify` is empty for every pipeline, this error is thrown because there is nothing to verify.","triggerScenarios":"Running `skaffold verify` with a skaffold.yaml that has no `verify:` section (or an empty `verify:` list) in any pipeline.","commonSituations":"Developers switching from `skaffold test` to `skaffold verify` without translating tests into `verify` test cases; multi-config profiles where the activated profile omits verify cases; typos like `verfiy:` or nesting `verify` under the wrong pipeline key.","solutions":["Add at least one entry under `verify:` in your skaffold.yaml defining a container test case (name + image).","If you meant to run render/dev/deploy, run the matching command instead of `verify`.","Check that the profile/config being activated (via -p or -f) actually contains the verify test cases.","Fix any YAML key misspellings so the verify cases parse into pipeline.Verify."],"exampleFix":"# before\napiVersion: skaffold/v4beta7\nkind: Config\ndeploy:\n  kubectl: {}\n# after\napiVersion: skaffold/v4beta7\nkind: Config\ndeploy:\n  kubectl: {}\nverify:\n  - name: smoke-test\n    container:\n      image: busybox\n      command: [\"sh\", \"-c\", \"curl -f http://myservice:8080/health\"]","handlingStrategy":"validation","validationCode":"const cfg = yaml.parse(fs.readFileSync('skaffold.yaml', 'utf8'));\nconst tcs = (cfg.verify ?? []).length + (cfg.profiles ?? []).flatMap(p => p.verify ?? []).length;\nif (process.argv.includes('verify') && tcs === 0) throw new Error('skaffold verify requires at least one verify test case');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include a non-empty verify: section before wiring verify into CI","Check active profiles (-p) still contain the verify cases","Run `skaffold verify --dry-run`-style local check before pipeline runs"],"tags":["skaffold","config-validation","verify"],"backgroundTag":"verify-no-test-cases","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"}