pass all m365 acc for trusted tests

This commit is contained in:
HiteshRepo 2024-02-04 12:59:30 +05:30
parent 81ce531472
commit 8286bb1ffe
3 changed files with 30 additions and 14 deletions

View File

@ -52,7 +52,18 @@ jobs:
# SetM365App will decide which M365 app to use for this CI run
SetM365App:
uses: alcionai/corso/.github/workflows/accSelector.yaml@ci-cache-enable
environment: Testing
runs-on: ubuntu-latest
outputs:
client_app_slot: ${{ steps.roundrobin.outputs.CLIENT_APP_SLOT }}
client_id_env: ${{ steps.roundrobin.outputs.CLIENT_ID_ENV }}
client_secret_env: ${{ steps.roundrobin.outputs.CLIENT_SECRET_ENV }}
steps:
- name: sets all client id and secrets
id: roundrobin
run: |
echo "CLIENT_ID_ENV=CLIENT_ID,CLIENT_ID_2,CLIENT_ID_3,CLIENT_ID_4" >> $GITHUB_OUTPUT
echo "CLIENT_SECRET_ENV=CLIENT_SECRET,CLIENT_SECRET_2,CLIENT_SECRET_3,CLIENT_SECRET_4" >> $GITHUB_OUTPUT
SetEnv:
environment: Testing

View File

@ -48,7 +48,7 @@ func TestExchangeBackupIntgSuite(t *testing.T) {
suite.Run(t, &ExchangeBackupIntgSuite{
Suite: tester.NewIntegrationSuite(
t,
[][]string{tconfig.M365AcctCredEnvs}), // , storeTD.AWSStorageCredEnvs
[][]string{tconfig.M365AcctCredEnvs, storeTD.AWSStorageCredEnvs}),
})
}
@ -114,21 +114,22 @@ func (suite *ExchangeBackupIntgSuite) TestBackup_Run_exchange() {
suite.Run(test.name, func() {
t := suite.T()
assert.NotEmpty(t, test.name)
ctx, flush := tester.NewContext(t)
defer flush()
// ctx, flush := tester.NewContext(t)
// defer flush()
var (
mb = evmock.NewBus()
counter = count.New()
sel = test.selector().Selector
opts = control.DefaultOptions()
whatSet = deeTD.CategoryFromRepoRef
)
// var (
// mb = evmock.NewBus()
// counter = count.New()
// sel = test.selector().Selector
// opts = control.DefaultOptions()
// whatSet = deeTD.CategoryFromRepoRef
// )
bo, bod := PrepNewTestBackupOp(t, ctx, mb, sel, opts, version.Backup, counter)
defer bod.Close(t, ctx)
// bo, bod := PrepNewTestBackupOp(t, ctx, mb, sel, opts, version.Backup, counter)
// defer bod.Close(t, ctx)
assert.NotEmpty(t, bo)
assert.NotEmpty(t, whatSet)
// sel = bod.Sel

View File

@ -1,6 +1,7 @@
package credentials
import (
"fmt"
"os"
"github.com/alcionai/clues"
@ -25,6 +26,9 @@ func GetM365() M365 {
AzureClientID := os.Getenv(AzureClientID)
AzureClientSecret := os.Getenv(AzureClientSecret)
fmt.Println("---------------> AZURE_CLIENT_ID", AzureClientID)
fmt.Println("---------------> AZURE_CLIENT_SECRET", AzureClientSecret)
return M365{
AzureClientID: AzureClientID,
AzureClientSecret: AzureClientSecret,