-
Notifications
You must be signed in to change notification settings - Fork 239
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
Support update test for BigQueryConnectionConnection #2342
Conversation
ad71f29
to
b7bc14b
Compare
serviceAccountId: "" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an extra line at the end of the file. If there is not, it'll show the red sign. E.g. https://github.com/GoogleCloudPlatform/k8s-config-connector/pull/1981/files#diff-ef5a4fb16c799f5e257555474294ae1b67dd2c733712e98c3b6db2a2e48aaf85
projectRef: | ||
external: ${projectId} | ||
cloudResource: | ||
serviceAccountId: "" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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" { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
/lgtm |
[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 |
608567a
into
GoogleCloudPlatform:master
Change description
Updated
spec.friendlyName
andspec.description
in the BigQueryConnectionConnection integration test, and support the update in the mockgcp.Tests you have done
make ready-pr
to ensure this PR is ready for review.