Skip to content

Commit

Permalink
fix: sort mockgcp string slice fields
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwenma committed Jun 21, 2024
1 parent 9801482 commit a0617a6
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 @@ -91,6 +91,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 a0617a6

Please sign in to comment.