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 will decide which M365 app to use for this CI run
SetM365App: 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: SetEnv:
environment: Testing environment: Testing

View File

@ -48,7 +48,7 @@ func TestExchangeBackupIntgSuite(t *testing.T) {
suite.Run(t, &ExchangeBackupIntgSuite{ suite.Run(t, &ExchangeBackupIntgSuite{
Suite: tester.NewIntegrationSuite( Suite: tester.NewIntegrationSuite(
t, 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() { suite.Run(test.name, func() {
t := suite.T() t := suite.T()
assert.NotEmpty(t, test.name) ctx, flush := tester.NewContext(t)
defer flush()
// ctx, flush := tester.NewContext(t) var (
// defer flush() mb = evmock.NewBus()
counter = count.New()
sel = test.selector().Selector
opts = control.DefaultOptions()
whatSet = deeTD.CategoryFromRepoRef
)
// var ( bo, bod := PrepNewTestBackupOp(t, ctx, mb, sel, opts, version.Backup, counter)
// mb = evmock.NewBus() defer bod.Close(t, ctx)
// counter = count.New()
// sel = test.selector().Selector
// opts = control.DefaultOptions()
// whatSet = deeTD.CategoryFromRepoRef
// )
// bo, bod := PrepNewTestBackupOp(t, ctx, mb, sel, opts, version.Backup, counter) assert.NotEmpty(t, bo)
// defer bod.Close(t, ctx) assert.NotEmpty(t, whatSet)
// sel = bod.Sel // sel = bod.Sel

View File

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