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

feat: Add managed account to the SDK #2357

Merged
merged 5 commits into from
Jan 17, 2024
Merged

Conversation

sfc-gh-asawicki
Copy link
Collaborator

Add managed account to the SDK:

  • used generator
  • changed no quotes to single quotes for ADMIN_NAME

References

Copy link

Integration tests failure for 916c8218016f939b1d3b418bb30a696fe357f7fa

@sfc-gh-asawicki sfc-gh-asawicki force-pushed the add-managed-account-to-sdk branch from 916c821 to dac416d Compare January 16, 2024 15:08
@sfc-gh-asawicki sfc-gh-asawicki marked this pull request as ready for review January 16, 2024 15:08
Copy link

Integration tests failure for dac416d5bb1bb0b7abc1b2f37419212e10f370e1

g.NewQueryStruct("CreateManagedAccountParams").
TextAssignment("ADMIN_NAME", g.ParameterOptions().SingleQuotes().Required()).
TextAssignment("ADMIN_PASSWORD", g.ParameterOptions().SingleQuotes().Required()).
PredefinedQueryStructField("typeProvider", "string", g.StaticOptions().SQL("TYPE = READER")).
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this be an enum rather than hardcoding? currently the only type supported is READER, but that could change in the future.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It can change in the future, but it's currently hardcoded in the docs. We can change it without problems later (if needed - because it may never change).

}
}

createManagedAccountBasicRequest := func(t *testing.T) *sdk.CreateManagedAccountRequest {
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should have a discussion on what the structure for these kinds of test request helpers should be. i think there are a few different patterns right now. also there's the helpers_test.go file in the integration test folder, I think we should refactor that as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We have already an issue for the helper test (SNOW-936093). We will have the discussion there. You are right we should unify the current approaches.

@sfc-gh-asawicki sfc-gh-asawicki merged commit f968db1 into main Jan 17, 2024
7 of 8 checks passed
@sfc-gh-asawicki sfc-gh-asawicki deleted the add-managed-account-to-sdk branch January 17, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants