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

Support update test for BigQueryConnectionConnection #2342

Merged

Conversation

maqiuyujoyce
Copy link
Collaborator

@maqiuyujoyce maqiuyujoyce commented Jul 23, 2024

Change description

Updated spec.friendlyName and spec.description in the BigQueryConnectionConnection integration test, and support the update in the mockgcp.

Tests you have done

  • Run make ready-pr to ensure this PR is ready for review.
  • Perform necessary E2E testing for changed resources.

serviceAccountId: ""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think we want an extra line in the end

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

projectRef:
external: ${projectId}
cloudResource:
serviceAccountId: ""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think we want an extra line in the end

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@@ -352,7 +352,7 @@ func testNoChange(ctx context.Context, t *testing.T, testContext testrunner.Test
func testUpdate(ctx context.Context, t *testing.T, testContext testrunner.TestContext, systemContext testrunner.SystemContext, resourceContext contexts.ResourceContext) {
// Tests with `SkipUpdate` explicitly set to 'true' or tests for
// auto-generated resources don't support update test.
if resourceContext.SkipUpdate || resourceContext.IsAutoGenerated(systemContext.SMLoader) {
if resourceContext.SkipUpdate || resourceContext.IsAutoGenerated(systemContext.SMLoader) && resourceContext.ResourceKind != "BigQueryConnectionConnection" {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious why we change the test behavior here. I think we should allow the dynamic test to cover the new update test(friendlyName &description) as well?

Copy link
Collaborator Author

@maqiuyujoyce maqiuyujoyce Jul 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This resource is hacky. It is not auto-generated, but we used the autogen channel to support it as a v1alpha1 resource. Auto-generated resources don't support the update test, so I have to explicitly make this resource a exceptional case to run testUpdate().

I don't want to turn this exception into a feature because this should be the only resource like this.

I'll add a comment about it.

@gemmahou
Copy link
Collaborator

/lgtm
/approve

@google-oss-prow google-oss-prow bot added the lgtm label Jul 25, 2024
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gemmahou

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 608567a into GoogleCloudPlatform:master Jul 25, 2024
13 checks passed
@yuwenma yuwenma added this to the 1.121 milestone Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants