Skip to content
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

Add s3 endpoint to get-account-info #912

Merged
merged 4 commits into from
Sep 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Cache-Control option when uploading files
* Add `--lifecycleRule` to `create-bucket` and `update-bucket` and deprecate `--lifecycleRules` argument
* Add extra dependencies for better UX, installable with `pip install b2[full]`
* Add s3 endpoint to `get-account-info`

### Deprecated
* Support of `-` as a valid filename in `upload-file` command. In future `-` will be an alias for standard input.
Expand Down
1 change: 1 addition & 0 deletions b2/console_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1469,6 +1469,7 @@ def run(self, args):
accountAuthToken=account_info.get_account_auth_token(),
apiUrl=account_info.get_api_url(),
downloadUrl=account_info.get_download_url(),
s3endpoint=account_info.get_s3_api_url(),
)
self._print_json(data)
return 0
Expand Down
4 changes: 3 additions & 1 deletion test/unit/test_console_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def _normalize_expected_output(self, text, format_vars=None):
def assertDictIsContained(self, subset, superset):
"""Asserts that all keys in `subset` are present is `superset` and their corresponding values are the same"""
truncated_superset = {k: v for k, v in superset.items() if k in subset}
self.maxDiff = None
self.assertEqual(subset, truncated_superset)

def assertListOfDictsIsContained(self, list_of_subsets, list_of_supersets):
Expand Down Expand Up @@ -1591,7 +1592,8 @@ def test_get_account_info(self):
},
"apiUrl": "http://api.example.com",
"applicationKey": self.master_key,
"downloadUrl": "http://download.example.com"
"downloadUrl": "http://download.example.com",
"s3endpoint": "http://s3.api.example.com",
}
self._run_command(
['get-account-info'],
Expand Down
Loading