diff --git a/.github/workflows/ci_test_cleanup.yml b/.github/workflows/ci_test_cleanup.yml index 461b90e6a..7008d2499 100644 --- a/.github/workflows/ci_test_cleanup.yml +++ b/.github/workflows/ci_test_cleanup.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: folder: [Corso_Restore_, TestRestore, ''] - user: [CORSO_M365_TEST_USER_ID, CORSO_SECONDARY_M365_TEST_USER_ID] + user: [CORSO_M365_TEST_USER_ID, CORSO_SECONDARY_M365_TEST_USER_ID, EXT_SDK_TEST_USER_ID] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/load_test.yml b/.github/workflows/load_test.yml index df1cc8f49..9d1b832ff 100644 --- a/.github/workflows/load_test.yml +++ b/.github/workflows/load_test.yml @@ -61,6 +61,7 @@ jobs: CORSO_PASSPHRASE: ${{ secrets.CORSO_PASSPHRASE }} CORSO_M365_LOAD_TEST_USER_ID: ${{ secrets.CORSO_M365_LOAD_TEST_USER_ID }} CORSO_M365_LOAD_TEST_ORG_USERS: ${{ secrets.CORSO_M365_LOAD_TEST_ORG_USERS }} + IGNORE_LOAD_TEST_USER_ID: ${{ secrets.EXT_SDK_TEST_USER_ID }} CORSO_LOAD_TESTS: true run: | set -euo pipefail diff --git a/src/internal/tester/resource_owners.go b/src/internal/tester/resource_owners.go index 052228f87..e7b4cef4f 100644 --- a/src/internal/tester/resource_owners.go +++ b/src/internal/tester/resource_owners.go @@ -1,6 +1,7 @@ package tester import ( + "os" "strings" "testing" @@ -89,7 +90,25 @@ func LoadTestM365OrgUsers(t *testing.T) []string { users = strings.ReplaceAll(users, `'`, "") users = strings.ReplaceAll(users, "|", ",") - return strings.Split(users, ",") + // a hack to skip using certain users when those accounts are + // temporarily being co-opted for non-testing purposes. + sl := strings.Split(users, ",") + remove := os.Getenv("IGNORE_LOAD_TEST_USER_ID") + + if len(remove) == 0 { + return sl + } + + idx := -1 + + for i, s := range sl { + if s == remove { + idx = i + break + } + } + + return append(sl[:idx], sl[idx+1:]...) } // M365SiteID returns a siteID string representing the m365SiteID described