log env var that were read

This commit is contained in:
HiteshRepo 2024-02-02 20:06:51 +05:30
parent dd48678bc4
commit a791587361
2 changed files with 22 additions and 1 deletions

View File

@ -186,8 +186,9 @@ jobs:
-tags testing \
-failfast \
-p 1 \
-v \
-timeout 20m \
-run '^TestDataCollectionIntgSuite/TestExchangeDataCollection$' ./internal/m365 \
-run '^TestExchangeBackupIntgSuite/TestBackup_Run_exchange$' ./internal/operations/test/m365/exchange \
2>&1 | tee /tmp/corso-trusted-testlog/gotest-ci.log
- name: peek

View File

@ -1,6 +1,7 @@
package tconfig
import (
"fmt"
"os"
"path/filepath"
"strings"
@ -78,6 +79,7 @@ func NewTestViper() (*viper.Viper, error) {
vpr := viper.New()
configFilePath := os.Getenv(EnvCorsoTestConfigFilePath)
fmt.Println("-----------> read CORSO_TEST_CONFIG_FILE", configFilePath)
if len(configFilePath) == 0 {
return vpr, nil
}
@ -120,6 +122,24 @@ func ReadTestConfig() (map[string]string, error) {
}
}
fmt.Println("----------> read S3_BUCKET", os.Getenv("S3_BUCKET"))
fmt.Println("----------> read AZURE_TENANT_ID", os.Getenv(account.AzureTenantID))
fmt.Println("----------> read CORSO_M365_TEST_USER_ID", os.Getenv(EnvCorsoM365TestUserID))
fmt.Println("----------> read CORSO_SECONDARY_M365_TEST_USER_ID", os.Getenv(EnvCorsoSecondaryM365TestUserID))
fmt.Println("----------> read CORSO_TERTIARY_M365_TEST_USER_ID", os.Getenv(EnvCorsoTertiaryM365TestUserID))
fmt.Println("----------> read CORSO_M365_LOAD_TEST_USER_ID", os.Getenv(EnvCorsoM365LoadTestUserID))
fmt.Println("----------> read CORSO_M365_LOAD_TEST_ORG_USERS", os.Getenv(EnvCorsoM365LoadTestOrgUsers))
fmt.Println("----------> read CORSO_M365_TEST_SITE_ID", os.Getenv(EnvCorsoM365TestSiteID))
fmt.Println("----------> read CORSO_M365_TEST_TEAM_ID", os.Getenv(EnvCorsoM365TestTeamID))
fmt.Println("----------> read CORSO_M365_TEST_TEAM_SITE_ID", os.Getenv(EnvCorsoM365TestTeamSiteID))
fmt.Println("----------> read CORSO_SECONDARY_M365_TEST_TEAM_ID", os.Getenv(EnvCorsoSecondaryM365TestTeamID))
fmt.Println("----------> read CORSO_M365_TEST_GROUP_ID", os.Getenv(EnvCorsoM365TestGroupID))
fmt.Println("----------> read CORSO_SECONDARY_M365_TEST_GROUP_ID", os.Getenv(EnvCorsoSecondaryM365TestGroupID))
fmt.Println("----------> read CORSO_M365_TEST_SITE_URL", os.Getenv(EnvCorsoM365TestSiteURL))
fmt.Println("----------> read CORSO_SECONDARY_M365_TEST_SITE_ID", os.Getenv(EnvCorsoSecondaryM365TestSiteID))
fmt.Println("----------> read CORSO_M365_TEST_UNLICENSED_USER", os.Getenv(EnvCorsoUnlicensedM365TestUserID))
fmt.Println("----------> read CORSO_M365_TEST_TEAM_EMAIL", os.Getenv(EnvCorsoM365TestTeamEmail))
testEnv := map[string]string{}
fallbackTo(testEnv, TestCfgStorageProvider, vpr.GetString(TestCfgStorageProvider))
fallbackTo(testEnv, TestCfgAccountProvider, vpr.GetString(TestCfgAccountProvider))