-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add validation to provider fields in both SDK and PF implementations …
…of provider schema (#9050) (#6358) * Add empty-string validator for PF provider * Add empty-string validator for SDK provider, move SDK validators to separate file * Add empty string validators to : credentials, access_token, impersonate_service_account, project, billing_project, region, zone * Add unit tests for `ValidateEmptyStrings` * Remove empty string test case from `ValidateCredentials` * Add acceptace tests showing that empty strings in provider block results in a validation error, and empty provider blocks have no validation errors * Make the SDK provider's `ValidateCredentials` validator reject empty strings * Update acceptance test after change in `credentials` validation * Fix test definitions to avoid fall-through * Update validation error message in code and tests Signed-off-by: Modular Magician <[email protected]>
- Loading branch information
1 parent
dd58dbd
commit 5eb5f99
Showing
7 changed files
with
256 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:breaking-change | ||
provider: added provider-level validation so these fields are not set as empty strings in a user's config: `credentials`, `access_token`, `impersonate_service_account`, `project`, `billing_project`, `region`, `zone` | ||
``` |
This file contains 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 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 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 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 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.