forked from aws/aws-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/ini: Fix ini parser to handle empty values (aws#2860)
The ini parser incorrectly decided whether a statement should be skipped. As a result, valid statements in the ini files were being squashed. The PR fixes incorrect modifications to the previous token value of the skipper. We also add checks for cases where a skipped statement should be marked as complete and not be ignored. Adds test cases for cases for statements that need to be skipped. Also adds suggested tests from aws#2801 . Fixes aws#2800
- Loading branch information
1 parent
5f1c1f9
commit 02207b1
Showing
9 changed files
with
89 additions
and
6 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[foo] | ||
aws_access_key_id = | ||
aws_secret_access_key = | ||
aws_session_token = | ||
[bar] | ||
aws_access_key_id = valid | ||
aws_secret_access_key = valid | ||
aws_session_token = valid | ||
[baz] | ||
aws_access_key_id = valid | ||
aws_secret_access_key = valid | ||
aws_session_token = valid |
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,14 @@ | ||
{ | ||
"foo": { | ||
}, | ||
"bar": { | ||
"aws_access_key_id": "valid", | ||
"aws_secret_access_key": "valid", | ||
"aws_session_token": "valid" | ||
}, | ||
"baz": { | ||
"aws_access_key_id": "valid", | ||
"aws_secret_access_key": "valid", | ||
"aws_session_token": "valid" | ||
} | ||
} |
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,12 @@ | ||
[foo] | ||
aws_access_key_id = | ||
aws_secret_access_key = valid | ||
aws_session_token = valid | ||
[bar] | ||
aws_access_key_id = valid | ||
aws_secret_access_key = valid | ||
aws_session_token = valid | ||
[baz] | ||
aws_access_key_id = valid | ||
aws_secret_access_key = valid | ||
aws_session_token = valid |
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,15 @@ | ||
{ | ||
"foo": { | ||
"aws_session_token": "valid" | ||
}, | ||
"bar": { | ||
"aws_access_key_id": "valid", | ||
"aws_secret_access_key": "valid", | ||
"aws_session_token": "valid" | ||
}, | ||
"baz": { | ||
"aws_access_key_id": "valid", | ||
"aws_secret_access_key": "valid", | ||
"aws_session_token": "valid" | ||
} | ||
} |
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