Skip to content

Commit

Permalink
test: add e2e test for multi-tenant feature (#12858)
Browse files Browse the repository at this point in the history
* test: add e2e test for multi-tenant feature

* test: update test case id

* fix: update m365 tenant name
  • Loading branch information
HuihuiWu-Microsoft authored Dec 6, 2024
1 parent 3a7fcbb commit 39120a8
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion packages/tests/src/e2e/command/accountCommand.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,44 @@ describe("account command", function () {
const subscription = getSubscriptionId();
const testFolder = getTestFolder();

it(
`auth login help support tenant parameter`,
{ testPlanCaseId: 30431027, author: "[email protected]" },
async function () {
stdlog = await execAsync(`teamsapp auth login m365 -h`, {
env: { ...process.env, TEAMSFX_MULTI_TENANT: "true" },
timeout: 0,
});

expect(stdlog.stdout).include("--tenant");
expect(stdlog.stderr).to.be.empty;
}
);

it(
`auth login to specified tenant`,
{ testPlanCaseId: 30430995, author: "[email protected]" },
async function () {
stdlog = await execAsync(`teamsapp auth login m365`, {
env: { ...process.env, TEAMSFX_MULTI_TENANT: "true" },
timeout: 0,
});

expect(stdlog.stdout).include("xxbdw");
expect(stdlog.stderr).to.be.empty;
}
);

it(
`auth list`,
{ testPlanCaseId: 15232246, author: "[email protected]" },
async function () {
stdlog = await execAsync(`teamsapp auth list`, {
env: process.env,
env: { ...process.env, TEAMSFX_MULTI_TENANT: "true" },
timeout: 0,
});

expect(stdlog.stdout).include("xxbdw");
expect(stdlog.stderr).to.be.empty;
}
);
Expand Down

0 comments on commit 39120a8

Please sign in to comment.