-
Notifications
You must be signed in to change notification settings - Fork 83
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
PART 2:use-github-storage
option validation
#1270
base: git-storage-option-feature
Are you sure you want to change the base?
Conversation
use-github-storage
option validation
Unit Test Results812 tests 812 ✅ 22s ⏱️ Results for commit 5d36e96. |
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.
Mostly looks good, left a couple of comments.
if (UseGithubStorage && AwsBucketName.HasValue()) | ||
{ | ||
throw new OctoshiftCliException("The --use-github-storage flag was provided with an AWS S3 Bucket name. Archive cannot be uploaded to both locations."); | ||
} |
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.
I guess we also need a check for when --use-github-storage
is provided with AzureStorageConnectionString
if (AwsBucketName.HasValue() && UseGithubStorage) | ||
{ | ||
throw new OctoshiftCliException("The --use-github-storage flag was provided with an AWS S3 Bucket name. Archive cannot be uploaded to both locations."); |
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.
I guess we also need a check for when --use-github-storage
is provided with AzureStorageConnectionString
ArchivePath = ARCHIVE_PATH, | ||
GithubOrg = GITHUB_ORG, | ||
GithubRepo = GITHUB_REPO, | ||
AzureStorageConnectionString = AZURE_STORAGE_CONNECTION_STRING, |
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.
Azure storage connection string shouldn't be provided along with aws bucket name. We probably need and extra validation for when both aws and azure options are provided together but probably it'd be a scope creep for this PR. I guess we need to create a ticket to revise our validations and add missing ones.
This pull request ensures proper validation of the
--use-github-storage
option.Closes: https://github.ghe.com/github/octoshift/issues/9326
ThirdPartyNotices.txt
(if applicable)