{"record":{"id":"0e9a71d62466449b","repo":"GoogleContainerTools/skaffold","slug":"found-duplicate-test-name-s-in-verify-test-ca","errorCode":null,"errorMessage":"found duplicate test name '%s' in 'verify' test cases. 'verify' test case names must be unique","messagePattern":"found duplicate test name '(.+?)' in 'verify' test cases\\. 'verify' test case names must be unique","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/schema/validation/validation.go","lineNumber":720,"sourceCode":"\t}\n\n\treturn nil\n}\n\n// validateVerifyTests\n// - makes sure that each test name is unique\n// - makes sure that each container name is unique\nfunc validateVerifyTests(runCtx *runcontext.RunContext) []error {\n\tvar errs []error\n\tseenTestName := map[string]bool{}\n\tseenContainerName := map[string]bool{}\n\ttcs := []*latest.VerifyTestCase{}\n\tfor _, pipeline := range runCtx.GetPipelines() {\n\t\ttcs = append(tcs, pipeline.Verify...)\n\t}\n\tfor _, tc := range tcs {\n\t\tif _, ok := seenTestName[tc.Name]; ok {\n\t\t\terrs = append(errs, fmt.Errorf(\"found duplicate test name '%s' in 'verify' test cases. 'verify' test case names must be unique\", tc.Name))\n\t\t}\n\t\tif _, ok := seenContainerName[tc.Container.Name]; ok {\n\t\t\terrs = append(errs, fmt.Errorf(\"found duplicate container name '%s' in 'verify' test cases. 'verify' container names must be unique\", tc.Container.Name))\n\t\t}\n\t\tseenTestName[tc.Name] = true\n\t\tseenContainerName[tc.Container.Name] = true\n\t}\n\treturn errs\n}\n\n// validateCustomActions\n// - makes sure that each custom action name is unique\n// - makes sure that each custom action container name is unique\nfunc validateCustomActionsNames(runCtx *runcontext.RunContext) (errs []error) {\n\tacs := []latest.Action{}\n\tseenAcs := map[string]bool{}\n\tseenConts := map[string]bool{}\n","sourceCodeStart":702,"sourceCodeEnd":738,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/schema/validation/validation.go#L702-L738","documentation":"Verify test case names must be unique across all pipelines in the run context, since Skaffold keys results and logs by test name. validateVerifyTests collects Verify test cases from every pipeline and errors when a name appears more than once.","triggerScenarios":"Two or more entries in verify (across any pipelines returned by runCtx.GetPipelines()) share the same `name:` field, processed via ProcessWithRunContext.","commonSituations":"Copy-pasting a verify test case and forgetting to rename it, or multi-config (multi-module) projects where each config defines a same-named verify test.","solutions":["Rename one of the duplicate verify test cases so all names are unique","Remove the redundant test case if it is an accidental duplicate","Check all included skaffold configs for name collisions when using multiple configs"],"exampleFix":"# before\nverify:\n  - name: integration-test\n    container: { name: tester, image: gcr.io/tester }\n  - name: integration-test\n    container: { name: tester2, image: gcr.io/tester2 }\n# after\nverify:\n  - name: integration-test\n    container: { name: tester, image: gcr.io/tester }\n  - name: smoke-test\n    container: { name: tester2, image: gcr.io/tester2 }","handlingStrategy":"validation","validationCode":"const names = configs.flatMap(c => c.verify ?? []).map(t => t.name);\nconst dupes = names.filter((n, i) => names.indexOf(n) !== i);\nif (dupes.length) throw new Error(`duplicate verify test names: ${[...new Set(dupes)].join(', ')}`);","typeGuard":null,"tryCatchPattern":"try {\n  await skaffold.verify(config);\n} catch (e) {\n  if (/duplicate test name .* in 'verify'/.test(e.message)) {\n    console.error('Rename the duplicated verify test case');\n  } else throw e;\n}","preventionTips":["Give verify test cases descriptive, unique names (e.g. module-prefixed)","Check names across all included configs when composing multi-config projects","Run skaffold diagnose in CI to catch duplicate names before deploys"],"tags":["skaffold","config-validation","verify","duplicate-names"],"backgroundTag":"skaffold-config-validation","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"}