Skip to content

Commit

Permalink
add mocktest for spannerinstance
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwenma committed May 10, 2024
1 parent 556668f commit 52b84df
Show file tree
Hide file tree
Showing 12 changed files with 9,395 additions and 1 deletion.
2 changes: 2 additions & 0 deletions config/tests/samples/create/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,8 @@ func MaybeSkip(t *testing.T, name string, resources []*unstructured.Unstructured
case schema.GroupKind{Group: "sql.cnrm.cloud.google.com", Kind: "SQLInstance"}:
case schema.GroupKind{Group: "sql.cnrm.cloud.google.com", Kind: "SQLUser"}:

case schema.GroupKind{Group: "spanner.cnrm.cloud.google.com", Kind: "SpannerInstance"}:

case schema.GroupKind{Group: "storage.cnrm.cloud.google.com", Kind: "StorageBucket"}:

case schema.GroupKind{Group: "tags.cnrm.cloud.google.com", Kind: "TagsTagKey"}:
Expand Down
1 change: 1 addition & 0 deletions mockgcp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ gen-proto:
./third_party/googleapis/mockgcp/devtools/artifactregistry/v1/*.proto \
./third_party/googleapis/mockgcp/iam/admin/v1/*.proto \
./third_party/googleapis/mockgcp/logging/v2/*.proto \
./third_party/googleapis/mockgcp/spanner/admin/instance/v1/*.proto \
./third_party/googleapis/mockgcp/cloud/aiplatform/v1beta1/annotation*.proto \
./third_party/googleapis/mockgcp/cloud/aiplatform/v1beta1/data_item.proto \
./third_party/googleapis/mockgcp/cloud/aiplatform/v1beta1/dataset*.proto \
Expand Down
5 changes: 5 additions & 0 deletions mockgcp/fixup-third-party.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ mv google/cloud/ mockgcp/
mv google/container/ mockgcp/
mv google/iam/ mockgcp/
mv google/logging/ mockgcp/
mv google/spanner/ mockgcp/
mv google/storage/ mockgcp/
mv google/monitoring/ mockgcp/

mv google/api/apikeys/ mockgcp/api/
mv google/api/serviceusage/ mockgcp/api/
mv google/devtools/artifactregistry mockgcp/devtools
Expand All @@ -54,6 +56,9 @@ find . -type f -print0 | xargs -0 sed -i -e "s@google\[email protected]
find . -type f -print0 | xargs -0 sed -i -e "s@google/storage/@mockgcp/storage/@g"
find . -type f -print0 | xargs -0 sed -i -e "s@google\[email protected]@g"

find . -type f -print0 | xargs -0 sed -i -e "s@google/spanner/@mockgcp/spanner/@g"
find . -type f -print0 | xargs -0 sed -i -e "s@google\[email protected]@g"

find . -type f -print0 | xargs -0 sed -i -e "s@google/api/apikeys/@mockgcp/api/apikeys/@g"
find . -type f -print0 | xargs -0 sed -i -e "s@google\.api\[email protected]@g"

Expand Down
278 changes: 278 additions & 0 deletions mockgcp/generated/mockgcp/spanner/admin/instance/v1/common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 52b84df

Please sign in to comment.