Support data plane RBAC for E2E tests. (#2176)

* Acquire token for NoSQL account prior to running tests.

* Change client id to user assigned managed identity.

* Change to use managed identity. Add token variables for gremlin and
tables.

* Add RBAC details to test README.

* Add token for SQL readonly database. Skip resource token tests when RBAC
enabled.

* Use hardcoded account name for sql readonly.

* Use specific tag for sql readonly.

* Remove comment.
This commit is contained in:
jawelton74
2025-08-05 10:59:57 -07:00
committed by GitHub
parent 870863a723
commit 0ef4399ba4
9 changed files with 166 additions and 34 deletions

View File

@@ -86,6 +86,30 @@ export async function getTestExplorerUrl(accountType: TestAccount, iframeSrc?: s
// For now, since we don't test copilot, we can disable the copilot APIs by setting the feature flag to false.
params.set("feature.enableCopilot", "false");
const nosqlRbacToken = process.env.NOSQL_TESTACCOUNT_TOKEN;
if (nosqlRbacToken) {
params.set("nosqlRbacToken", nosqlRbacToken);
params.set("enableaaddataplane", "true");
}
const nosqlReadOnlyRbacToken = process.env.NOSQL_READONLY_TESTACCOUNT_TOKEN;
if (nosqlReadOnlyRbacToken) {
params.set("nosqlReadOnlyRbacToken", nosqlReadOnlyRbacToken);
params.set("enableaaddataplane", "true");
}
const tableRbacToken = process.env.TABLE_TESTACCOUNT_TOKEN;
if (tableRbacToken) {
params.set("tableRbacToken", tableRbacToken);
params.set("enableaaddataplane", "true");
}
const gremlinRbacToken = process.env.GREMLIN_TESTACCOUNT_TOKEN;
if (gremlinRbacToken) {
params.set("gremlinRbacToken", gremlinRbacToken);
params.set("enableaaddataplane", "true");
}
if (iframeSrc) {
params.set("iframeSrc", iframeSrc);
}