Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mockGCP: mock containeranalysisnote #1844

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/tests/samples/create/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,8 @@ func MaybeSkip(t *testing.T, name string, resources []*unstructured.Unstructured
case schema.GroupKind{Group: "container.cnrm.cloud.google.com", Kind: "ContainerCluster"}:
case schema.GroupKind{Group: "container.cnrm.cloud.google.com", Kind: "ContainerNodePool"}:

case schema.GroupKind{Group: "containeranalysis.cnrm.cloud.google.com", Kind: "ContainerAnalysisNote"}:

case schema.GroupKind{Group: "iam.cnrm.cloud.google.com", Kind: "IAMPartialPolicy"}:
case schema.GroupKind{Group: "iam.cnrm.cloud.google.com", Kind: "IAMPolicy"}:
case schema.GroupKind{Group: "iam.cnrm.cloud.google.com", Kind: "IAMPolicyMember"}:
Expand Down
3 changes: 2 additions & 1 deletion mockgcp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ gen-proto: generate-protos-from-openapi
./third_party/googleapis/mockgcp/cloud/gkehub/v1beta/*.proto \
./third_party/googleapis/mockgcp/cloud/gkehub/v1beta/configmanagement/*.proto \
./third_party/googleapis/mockgcp/cloud/gkehub/v1beta/metering/*.proto \
./third_party/googleapis/mockgcp/cloud/gkehub/v1beta/multiclusteringress/*.proto
./third_party/googleapis/mockgcp/cloud/gkehub/v1beta/multiclusteringress/*.proto \
./third_party/googleapis/mockgrafeas/v1/*.proto

.PHONY: generate-protos-from-openapi
generate-protos-from-openapi:
Expand Down
11 changes: 10 additions & 1 deletion mockgcp/fixup-third-party.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ mv google/api/serviceusage/ mockgcp/api/
mv google/devtools/artifactregistry mockgcp/devtools
mv google/devtools/cloudbuild mockgcp/devtools

rm -rf mockgrafeas/
mv grafeas mockgrafeas

cd mockgcp

# Rewrite import paths.
Expand Down Expand Up @@ -74,4 +77,10 @@ find . -type f -print0 | xargs -0 sed -i -e "s@google/devtools/artifactregistry/
find . -type f -print0 | xargs -0 sed -i -e "s@google\.devtools\.artifactregistry@mockgcp.devtools.artifactregistry@g"

find . -type f -print0 | xargs -0 sed -i -e "s@google/devtools/cloudbuild/@mockgcp/devtools/cloudbuild/@g"
find . -type f -print0 | xargs -0 sed -i -e "s@google\.devtools\.cloudbuild@mockgcp.devtools.cloudbuild@g"
find . -type f -print0 | xargs -0 sed -i -e "s@google\.devtools\.cloudbuild@mockgcp.devtools.cloudbuild@g"

cd ..
cd mockgrafeas

find . -type f -print0 | xargs -0 sed -i -e "s@grafeas/@mockgrafeas/@g"
find . -type f -print0 | xargs -0 sed -i -e "s@grafeas\.@mockgrafeas.@g"