Skip to content

Commit

Permalink
Update autogen test suffix from "basic" to "autogen"
Browse files Browse the repository at this point in the history
  • Loading branch information
gemmahou committed Oct 10, 2024
1 parent 017bae2 commit 25cf1bc
Show file tree
Hide file tree
Showing 60 changed files with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/resource-autogen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ func convertTFSamplesToKRMTestdata(tfToGVK map[string]schema.GroupVersionKind, s
continue
}

// Change 'basic' suffix in sampleName to 'autogen', to avoid name conflict with Direct Controller basic test.
// Note: We do not use this script for a while, and I manually updated existing autogen tests names.
// Make the change just in case we want to reuse in the future.
sampleName = strings.TrimSuffix(sampleName, "basic") + "autogen"

if err := insertTestData(create, dependencies, autoGenType, sampleName, generatedSamples); err != nil {
errToReturn := fmt.Errorf("error unmarshaling json for TF sample %s: %w", sf, err)
klog.Warningf("Failed sample conversion: %v", errToReturn)
Expand Down

0 comments on commit 25cf1bc

Please sign in to comment.