Add wrong account key test for SQL connection string login

This commit is contained in:
Asier Isayas
2026-08-13 09:42:57 -04:00
parent 6955b2cf74
commit 6dca33ba16
+3 -3
View File
@@ -71,9 +71,9 @@ test.describe("SQL account using connection string login", () => {
const accountName = getAccountName(TestAccount.SQL); const accountName = getAccountName(TestAccount.SQL);
const account = await context.armClient.databaseAccounts.get(resourceGroupName, accountName); 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 // A well-formed but incorrect base64 account key (88-char, 64-byte): the endpoint is valid, so the
// the account but the data-plane request is rejected with 401 Unauthorized. // Cosmos client reaches the account but the data-plane request is rejected with 401 Unauthorized.
const wrongKey = Buffer.alloc(64).toString("base64"); const wrongKey = "A".repeat(86) + "==";
const connectionString = `AccountEndpoint=${account.documentEndpoint};AccountKey=${wrongKey};`; const connectionString = `AccountEndpoint=${account.documentEndpoint};AccountKey=${wrongKey};`;
await page.goto("https://localhost:1234/hostedExplorer.html"); await page.goto("https://localhost:1234/hostedExplorer.html");