Skip to content

Commit

Permalink
DSQL: Verify we can generate tokens (#8510)
Browse files Browse the repository at this point in the history
  • Loading branch information
bblommers authored Jan 20, 2025
1 parent a330996 commit 69a3669
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/test_dsql/test_dsql.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,18 @@ def test_get_cluster():
assert get_resp["creationTime"] == datetime(
2024, 12, 22, 12, 34, tzinfo=tzutc()
)


@mock_aws()
def test_generate_tokens():
client = boto3.client("dsql", TEST_REGION)

hostname = "dsql.amazonaws.com"

admin_url = client.generate_db_connect_admin_auth_token(Hostname=hostname)
assert admin_url.startswith(hostname)
assert "Action=DbConnectAdmin" in admin_url

url = client.generate_db_connect_auth_token(Hostname=hostname)
assert url.startswith(hostname)
assert "Action=DbConnect" in url

0 comments on commit 69a3669

Please sign in to comment.