amend test user cleanup list (#1724)
## Type of change - [x] 💻 CI/Deployment ## Test Plan - [x] 💚 E2E
This commit is contained in:
parent
a6aa86ce5c
commit
9cab212776
2
.github/workflows/ci_test_cleanup.yml
vendored
2
.github/workflows/ci_test_cleanup.yml
vendored
@ -12,7 +12,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
folder: [Corso_Restore_, TestRestore, '']
|
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:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|||||||
1
.github/workflows/load_test.yml
vendored
1
.github/workflows/load_test.yml
vendored
@ -61,6 +61,7 @@ jobs:
|
|||||||
CORSO_PASSPHRASE: ${{ secrets.CORSO_PASSPHRASE }}
|
CORSO_PASSPHRASE: ${{ secrets.CORSO_PASSPHRASE }}
|
||||||
CORSO_M365_LOAD_TEST_USER_ID: ${{ secrets.CORSO_M365_LOAD_TEST_USER_ID }}
|
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 }}
|
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
|
CORSO_LOAD_TESTS: true
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package tester
|
package tester
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
@ -89,7 +90,25 @@ func LoadTestM365OrgUsers(t *testing.T) []string {
|
|||||||
users = strings.ReplaceAll(users, `'`, "")
|
users = strings.ReplaceAll(users, `'`, "")
|
||||||
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
|
// M365SiteID returns a siteID string representing the m365SiteID described
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user