-
Notifications
You must be signed in to change notification settings - Fork 916
modify ProcessCredentialsProviderTest to interpret session tokens #1528
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
modify ProcessCredentialsProviderTest to interpret session tokens #1528
Conversation
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.
As we discussed offline I don't like the pattern of passing in an arbitrary string as a fixed argument to trigger optional behavior, I would prefer proper command line processing, but given this is a windows batch file and given its scope (test helper script), I think it's fine to just acknowledge and continue with this version.
@@ -6,7 +6,11 @@ ECHO "AccessKeyId": "%1", | |||
ECHO "SecretAccessKey": "%2" | |||
IF NOT "%3"=="" ( | |||
ECHO , | |||
ECHO "SessionToken": "%RANDOM" | |||
IF "%3"=="RANDOM_TOKEN" ( | |||
ECHO "SessionToken": "%RANDOM" |
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.
Change to %RANDOM%
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 agree that it is not the optimal way to structure the script.
Codecov Report
@@ Coverage Diff @@
## master #1528 +/- ##
============================================
+ Coverage 74.78% 74.87% +0.08%
Complexity 759 759
============================================
Files 867 871 +4
Lines 26715 26838 +123
Branches 2048 2065 +17
============================================
+ Hits 19979 20095 +116
- Misses 5820 5822 +2
- Partials 916 921 +5
Continue to review full report at Codecov.
|
…tokens in script fix RANDOM function in bat script for unit test
4cd9cc9
to
d79ffe0
Compare
…test-sessiontoken
…a18bedd06 Pull request: release <- staging/a59b358e-c6e3-4945-9b19-efaa18bedd06
Description
The unit tests sometimes provide a session token when they create AWS credentials. Currently, the scripts that generate the credentials do not honor this parameter. This commit changes that while preserving the ability to randomize tokens, which is necessary in expiration tests.
Testing
Unit tested
Types of changes
Checklist
mvn install
succeedsLicense