mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-09-19 17:12:47 +01:00
Add wrong account key test for SQL connection string login
This commit is contained in:
@@ -71,9 +71,9 @@ test.describe("SQL account using connection string login", () => {
|
||||
const accountName = getAccountName(TestAccount.SQL);
|
||||
const account = await context.armClient.databaseAccounts.get(resourceGroupName, accountName);
|
||||
|
||||
// A well-formed but incorrect base64 account key: the endpoint is valid, so the Cosmos client reaches
|
||||
// the account but the data-plane request is rejected with 401 Unauthorized.
|
||||
const wrongKey = Buffer.alloc(64).toString("base64");
|
||||
// A well-formed but incorrect base64 account key (88-char, 64-byte): the endpoint is valid, so the
|
||||
// Cosmos client reaches the account but the data-plane request is rejected with 401 Unauthorized.
|
||||
const wrongKey = "A".repeat(86) + "==";
|
||||
const connectionString = `AccountEndpoint=${account.documentEndpoint};AccountKey=${wrongKey};`;
|
||||
|
||||
await page.goto("https://localhost:1234/hostedExplorer.html");
|
||||
|
||||
Reference in New Issue
Block a user