Skip to content

Commit

Permalink
Enable mock test for GKEHubfeatureMembership
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyue-101 committed Jun 10, 2024
1 parent 0ab6cb6 commit b61c20a
Show file tree
Hide file tree
Showing 9 changed files with 1,494 additions and 192 deletions.
1 change: 1 addition & 0 deletions config/tests/samples/create/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ func MaybeSkip(t *testing.T, name string, resources []*unstructured.Unstructured

case schema.GroupKind{Group: "gkehub.cnrm.cloud.google.com", Kind: "GKEHubFeature"}:
case schema.GroupKind{Group: "gkehub.cnrm.cloud.google.com", Kind: "GKEHubMembership"}:
case schema.GroupKind{Group: "gkehub.cnrm.cloud.google.com", Kind: "GKEHubFeatureMembership"}:

case schema.GroupKind{Group: "cloudbuild.cnrm.cloud.google.com", Kind: "CloudBuildWorkerPool"}:

Expand Down
1,247 changes: 1,247 additions & 0 deletions mockgcp/generated/mockgcp/cloud/gkehub/servicemesh/v1beta/servicemesh.pb.go

Large diffs are not rendered by default.

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

425 changes: 239 additions & 186 deletions mockgcp/generated/mockgcp/cloud/gkehub/v1beta/feature.pb.go

Large diffs are not rendered by default.

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

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

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

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

3 changes: 2 additions & 1 deletion mockgcp/mockgkehub/gkehubfeature.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ func (s *GKEHubFeature) UpdateFeature(ctx context.Context, req *pb.UpdateFeature
switch path {
case "labels":
obj.Labels = req.Resource.GetLabels()
// Spec is in the GCP API, not a KRM Spec
case "spec":
obj.Spec.FeatureSpec = req.GetResource().Spec.GetFeatureSpec().(*pb.CommonFeatureSpec_Multiclusteringress)
obj.Spec = req.GetResource().Spec
case "membershipSpecs":
obj.MembershipSpecs = req.GetResource().GetMembershipSpecs()
default:
Expand Down

0 comments on commit b61c20a

Please sign in to comment.