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 855f49d
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 have not used this script for a while, so I manually updated the names of the existing autogen tests.
// I made the change just in case we want to reuse it 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 855f49d

Please sign in to comment.