Commit d963e30
Categorize managed-identity E2E tests and exclude them from the PR build (#3923)
* Categorize managed-identity E2E tests and exclude them from the PR build
The `AcquireTokenManagedIdentity` E2E test acquires a token for a user-assigned
managed identity via IMDS, so it requires an MI assigned to the build host. It
passes on the official OneBranch pipeline (VM-based agents that have the MI) but
fails on Microsoft-hosted agents (no MI, IMDS returns "Identity not found").
Following the MSAL approach of categorizing MI tests and running them only where
an MI is available:
- Add a shared `TestCategories.ManagedIdentity` ("MI_E2E") constant and tag the
`AcquireTokenManagedIdentity` class with `[Trait("Category", "MI_E2E")]`.
- Parameterize `template-run-unit-tests.yaml` with `e2eTestFilterCriteria`
(default empty, so the release build and any other consumer are unaffected).
- The PR build (azure-pipelines.yml) passes `Category!=MI_E2E` to exclude the MI
tests, which run on Microsoft-hosted agents.
The official OneBranch pipeline uses its own inline VSTest steps and is not
affected, so it continues to run the MI tests on VM-based agents.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Trigger ADO PR pipeline
Empty commit to kick off the newly added ADO PR pipeline trigger.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 1253aee commit d963e30
4 files changed
Lines changed: 37 additions & 0 deletions
File tree
- build
- tests
- E2E Tests/TokenAcquirerTests
- Microsoft.Identity.Web.Test.Common
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
4 | 13 | | |
5 | 14 | | |
6 | 15 | | |
| |||
38 | 47 | | |
39 | 48 | | |
40 | 49 | | |
| 50 | + | |
41 | 51 | | |
42 | 52 | | |
43 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
| 554 | + | |
554 | 555 | | |
555 | 556 | | |
556 | 557 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments