Skip to content

Commit

Permalink
Merge pull request #2096 from yuwenma/stricter-test-string-order
Browse files Browse the repository at this point in the history
fix: sort mockgcp string slice fields
  • Loading branch information
google-oss-prow[bot] authored Jun 21, 2024
2 parents cb4024e + a0617a6 commit 404ed0a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ spec:
metadata:
disable-legacy-endpoints: "true"
oauthScopes:
- https://www.googleapis.com/auth/devstorage.read_only
- https://www.googleapis.com/auth/logging.write
- https://www.googleapis.com/auth/monitoring
- https://www.googleapis.com/auth/service.management.readonly
- https://www.googleapis.com/auth/servicecontrol
- https://www.googleapis.com/auth/trace.append
- https://www.googleapis.com/auth/devstorage.read_only
- https://www.googleapis.com/auth/logging.write
serviceAccountRef:
external: default
shieldedInstanceConfig:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ spec:
nodeConfig:
loggingVariant: DEFAULT
oauthScopes:
- https://www.googleapis.com/auth/trace.append
- https://www.googleapis.com/auth/devstorage.read_only
- https://www.googleapis.com/auth/logging.write
- https://www.googleapis.com/auth/monitoring
- https://www.googleapis.com/auth/service.management.readonly
- https://www.googleapis.com/auth/servicecontrol
- https://www.googleapis.com/auth/trace.append
nodeLocations:
- us-central1-a
nodeVersion: ""
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/normalize.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ func normalizeKRMObject(u *unstructured.Unstructured, project testgcp.GCPProject
visitor.sortSlices = sets.New[string]()
// TODO: This should not be needed, we want to avoid churning the kube objects
visitor.sortSlices.Insert(".spec.access")
visitor.sortSlices.Insert(".spec.nodeConfig.oauthScopes")

visitor.stringTransforms = append(visitor.stringTransforms, func(path string, s string) string {
return strings.ReplaceAll(s, project.ProjectID, "${projectId}")
Expand Down

0 comments on commit 404ed0a

Please sign in to comment.