mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-05-14 01:07:25 +01:00
Scale the number of test accounts used for SQL tests to one per shard. (#2468)
* Scale the number of test accounts used for SQL tests to one per shard. * Set PLAYWRIGHT_SHARD_INDEX environment variable in CI workflow. * Add log statement for the shared index and selected account. * Remove console log. * Fix order of accounts so that shard index maps to same account index. * Try to fix the SQL account scope in ci.yml * Get tokens for all accounts and use the shard index to pick which one. * Set tokens without loop. * Handcode the token use in tests. * Fix database creation. * Add debug for rbac token issues. * Common function for retrieving NoSQL token. * Disable eslint rule for noconsole temporarily. * Move getNoSqlRbacToken to separate file. * Fix ref to new function. * mock Resource Graph API — fires on auto-subscription selection to populate account dropdown * Code tidy-up. * Fix build errors. --------- Co-authored-by: Bikram Choudhury <bchoudhury@microsoft.com>
This commit is contained in:
+2
-1
@@ -18,6 +18,7 @@ import {
|
||||
subscriptionId,
|
||||
TestAccount,
|
||||
} from "./fx";
|
||||
import { getNoSqlRbacToken } from "./NoSqlTestSetup";
|
||||
|
||||
// In Node.js >= 19, globalThis.crypto is already available as a read-only getter.
|
||||
// Only assign the polyfill for older versions.
|
||||
@@ -134,7 +135,7 @@ async function createCosmosClientForSQLAccount(
|
||||
|
||||
const rbacToken =
|
||||
accountType === TestAccount.SQL
|
||||
? process.env.NOSQL_TESTACCOUNT_TOKEN
|
||||
? getNoSqlRbacToken()
|
||||
: accountType === TestAccount.SQLContainerCopyOnly
|
||||
? process.env.NOSQL_CONTAINERCOPY_TESTACCOUNT_TOKEN
|
||||
: "";
|
||||
|
||||
Reference in New Issue
Block a user