Commit 9f554cc
authored
[Internal] Use TEST_ENVIRONMENT_TYPE for acceptance test environment detection (#5476)
## Changes
<!-- Summary of your changes that are easy to understand -->
- Replaces ad-hoc environment variable checks (`DATABRICKS_ACCOUNT_ID`,
`TEST_METASTORE_ID`) with a single `TEST_ENVIRONMENT_TYPE` variable for
determining test execution context
- Introduces `skipIfNotEnvironmentType()` helper that centralizes skip
logic for all four test levels: `ACCOUNT`, `WORKSPACE`, `UC_ACCOUNT`,
`UC_WORKSPACE`
- Simplifies `LoadWorkspaceEnv`, `LoadAccountEnv`, `LoadUcwsEnv`, and
`LoadUcacctEnv` to one-liners
## Tests
<!--
How is this tested? Please see the checklist below and also describe any
other relevant tests
-->
NO_CHANGELOG=true1 parent 4c7a3b9 commit 9f554cc
1 file changed
Lines changed: 17 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | | - | |
440 | | - | |
441 | | - | |
| 439 | + | |
442 | 440 | | |
443 | 441 | | |
444 | 442 | | |
445 | 443 | | |
446 | | - | |
447 | | - | |
448 | | - | |
| 444 | + | |
449 | 445 | | |
450 | 446 | | |
451 | 447 | | |
452 | 448 | | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
| 449 | + | |
459 | 450 | | |
460 | 451 | | |
461 | 452 | | |
462 | 453 | | |
463 | | - | |
464 | | - | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
465 | 463 | | |
466 | | - | |
467 | | - | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
468 | 468 | | |
| 469 | + | |
469 | 470 | | |
470 | 471 | | |
471 | 472 | | |
| |||
0 commit comments