amend test user cleanup list (#1724)

## Type of change

- [x] 💻 CI/Deployment

## Test Plan

- [x] 💚 E2E
This commit is contained in:
Keepers 2022-12-08 09:58:32 -07:00 committed by GitHub
parent a6aa86ce5c
commit 9cab212776
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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