-
Notifications
You must be signed in to change notification settings - Fork 0
cxp-26 add user provisioning #101
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
9b8efa0
add user provisioning
agustin-conductor d578bd8
fix ci
agustin-conductor 744a318
address minor pr comments
agustin-conductor b891f59
fetch user after create
agustin-conductor 65339bc
avoid returning complete http response
agustin-conductor 2b30f57
ensure close body
agustin-conductor fa96a02
use credential opts force change password
agustin-conductor 04b417d
address pr comments
agustin-conductor 7ff122d
refactor after rebase
agustin-conductor e710dfa
change log to Debug
agustin-conductor 5a0394d
fix lint
agustin-conductor cc2a850
address quotation mark in username edge case
agustin-conductor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,22 @@ | ||
| package connector | ||
|
|
||
| import "fmt" | ||
| import ( | ||
| "fmt" | ||
| "strings" | ||
| ) | ||
|
|
||
| func wrapError(err error, message string) error { | ||
| return fmt.Errorf("snowflake-connector: %s: %w", message, err) | ||
| } | ||
|
|
||
| const resourcePageSize = 50 | ||
|
|
||
| // quoteSnowflakeIdentifier properly escapes and quotes a Snowflake identifier. | ||
| // In Snowflake, double quotes inside identifiers must be escaped by doubling them. | ||
| // Example: o"donnel becomes "o""donnel". | ||
| func quoteSnowflakeIdentifier(identifier string) string { | ||
| // Escape double quotes by doubling them | ||
| escaped := strings.ReplaceAll(identifier, `"`, `""`) | ||
| // Wrap in double quotes | ||
| return fmt.Sprintf(`"%s"`, escaped) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
NOTE: our testing env expires soon as its a trail, when that happens credentials will no longer work and this test will fail. should I make this optional disable?
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.
You probably can keep this to validate the execution while we have an account. If new features are developed on the future, the credentials should be updated to the ones generated around testing that feature.
If not, you could create a test server that mimics the API and use that one for the CI tests