diff --git a/src/go/cmd/update-collection-v3/main.go b/src/go/cmd/update-collection-v3/main.go index 6317ad2b..ab665042 100644 --- a/src/go/cmd/update-collection-v3/main.go +++ b/src/go/cmd/update-collection-v3/main.go @@ -75,7 +75,7 @@ func migrateYamlFile(yamlV2FilePath string, yamlV3FilePath string) error { var migrations = []Migration{ { - directory: "kube-prometheus-stack", + directory: "kube-state-metrics-collectors", action: kubestatemetricscollectors.Migrate, }, { diff --git a/src/go/cmd/update-collection-v3/main_test.go b/src/go/cmd/update-collection-v3/main_test.go index 9511b3e1..6c447af3 100644 --- a/src/go/cmd/update-collection-v3/main_test.go +++ b/src/go/cmd/update-collection-v3/main_test.go @@ -16,6 +16,9 @@ func TestIndividualMigrations(t *testing.T) { _, testFileName, _, _ := runtime.Caller(0) currentTestDirectory := path.Dir(testFileName) for _, migration := range migrations { + migrationDirectory := path.Join(currentTestDirectory, "migrations", migration.directory) + _, err := os.Stat(migrationDirectory) + require.NoError(t, err, "migration directory '%s' not found", migration.directory) testMigrationsInDirectory(t, migration.action, path.Join(currentTestDirectory, "migrations", migration.directory, "testdata")) } }