Skip to content

Commit

Permalink
Merge pull request #912 from Backblaze/s3endpoint
Browse files Browse the repository at this point in the history
Add s3 endpoint to get-account-info
  • Loading branch information
mpnowacki-reef authored Sep 2, 2023
2 parents b170ca6 + 6bfc868 commit 12e894e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
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

0 comments on commit 12e894e

Please sign in to comment.