GoogleContainerTools/skaffold · error
found duplicate test name '%s' in 'verify' test cases. 'veri
Error message
found duplicate test name '%s' in 'verify' test cases. 'verify' test case names must be unique
What it means
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.
Source
Thrown at pkg/skaffold/schema/validation/validation.go:720
}
return nil
}
// validateVerifyTests
// - makes sure that each test name is unique
// - makes sure that each container name is unique
func validateVerifyTests(runCtx *runcontext.RunContext) []error {
var errs []error
seenTestName := map[string]bool{}
seenContainerName := map[string]bool{}
tcs := []*latest.VerifyTestCase{}
for _, pipeline := range runCtx.GetPipelines() {
tcs = append(tcs, pipeline.Verify...)
}
for _, tc := range tcs {
if _, ok := seenTestName[tc.Name]; ok {
errs = append(errs, fmt.Errorf("found duplicate test name '%s' in 'verify' test cases. 'verify' test case names must be unique", tc.Name))
}
if _, ok := seenContainerName[tc.Container.Name]; ok {
errs = append(errs, fmt.Errorf("found duplicate container name '%s' in 'verify' test cases. 'verify' container names must be unique", tc.Container.Name))
}
seenTestName[tc.Name] = true
seenContainerName[tc.Container.Name] = true
}
return errs
}
// validateCustomActions
// - makes sure that each custom action name is unique
// - makes sure that each custom action container name is unique
func validateCustomActionsNames(runCtx *runcontext.RunContext) (errs []error) {
acs := []latest.Action{}
seenAcs := map[string]bool{}
seenConts := map[string]bool{}
View on GitHub (pinned to a1189de023)
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
Example fix
# before
verify:
- name: integration-test
container: { name: tester, image: gcr.io/tester }
- name: integration-test
container: { name: tester2, image: gcr.io/tester2 }
# after
verify:
- name: integration-test
container: { name: tester, image: gcr.io/tester }
- name: smoke-test
container: { name: tester2, image: gcr.io/tester2 } Defensive patterns
Strategy: validation
Validate before calling
const names = configs.flatMap(c => c.verify ?? []).map(t => t.name);
const dupes = names.filter((n, i) => names.indexOf(n) !== i);
if (dupes.length) throw new Error(`duplicate verify test names: ${[...new Set(dupes)].join(', ')}`); Try / catch
try {
await skaffold.verify(config);
} catch (e) {
if (/duplicate test name .* in 'verify'/.test(e.message)) {
console.error('Rename the duplicated verify test case');
} else throw e;
} Prevention
- 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
When it happens
Trigger: Two or more entries in verify (across any pipelines returned by runCtx.GetPipelines()) share the same `name:` field, processed via ProcessWithRunContext.
Common situations: 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.
Related errors
- found duplicate container name '%s' in 'verify' test cases.
- verify command expects non-zero number of test cases
- found duplicate custom action %s. Custom action names must b
- CONFIG_MISSING_MANIFEST_FILE_ERR
- INIT_CLOUD_RUN_LOCATION_ERROR
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/0e9a71d62466449b.
Report an issue: GitHub.