Documentation ¶
Index ¶
- Constants
- Variables
- func GetM365SiteID(ctx context.Context) string
- func GetM365TeamID(ctx context.Context) string
- func GetM365TeamSiteID(ctx context.Context) string
- func GetM365TenantID(ctx context.Context) string
- func GetM365UserID(ctx context.Context) string
- func LoadTestM365OrgSites(t *testing.T) []string
- func LoadTestM365OrgUsers(t *testing.T) []string
- func LoadTestM365SiteID(t *testing.T) string
- func LoadTestM365UserID(t *testing.T) string
- func M365GroupID(t *testing.T) string
- func M365SiteID(t *testing.T) string
- func M365SiteURL(t *testing.T) string
- func M365TeamEmail(t *testing.T) string
- func M365TeamID(t *testing.T) string
- func M365TenantID(t *testing.T) string
- func M365UserID(t *testing.T) string
- func MakeTempTestConfigClone(t *testing.T, overrides map[string]string) (*viper.Viper, string)
- func NewFakeM365Account(t *testing.T) account.Account
- func NewM365Account(t *testing.T) account.Account
- func NewTestViper() (*viper.Viper, error)
- func ReadTestConfig() (map[string]string, error)
- func SecondaryM365SiteID(t *testing.T) string
- func SecondaryM365TeamID(t *testing.T) string
- func SecondaryM365UserID(t *testing.T) string
- func TertiaryM365UserID(t *testing.T) string
- func UnlicensedM365UserID(t *testing.T) string
Constants ¶
const ( // S3 config TestCfgBucket = "bucket" TestCfgEndpoint = "endpoint" TestCfgPrefix = "prefix" TestCfgStorageProvider = "provider" TestCfgFilesystemPath = "path" // M365 config TestCfgAzureTenantID = "azure_tenantid" TestCfgSecondarySiteID = "secondarym365siteid" TestCfgSiteID = "m365siteid" TestCfgSiteURL = "m365siteurl" TestCfgTeamID = "m365teamid" TestCfgTeamEmail = "m365teamemail" TestCfgTeamSiteID = "m365teamsiteid" TestCfgGroupID = "m365groupid" TestCfgUserID = "m365userid" TestCfgSecondaryUserID = "secondarym365userid" TestCfgSecondaryGroupID = "secondarym365groupid" TestCfgSecondaryTeamID = "secondarym365teamid" TestCfgTertiaryUserID = "tertiarym365userid" TestCfgLoadTestUserID = "loadtestm365userid" TestCfgLoadTestOrgUsers = "loadtestm365orgusers" TestCfgAccountProvider = "account_provider" TestCfgUnlicensedUserID = "unlicensedm365userid" )
const ( EnvCorsoM365LoadTestUserID = "CORSO_M365_LOAD_TEST_USER_ID" EnvCorsoM365LoadTestOrgUsers = "CORSO_M365_LOAD_TEST_ORG_USERS" EnvCorsoM365TestSiteID = "CORSO_M365_TEST_SITE_ID" EnvCorsoM365TestSiteURL = "CORSO_M365_TEST_SITE_URL" EnvCorsoM365TestTeamID = "CORSO_M365_TEST_TEAM_ID" EnvCorsoM365TestTeamEmail = "CORSO_M365_TEST_TEAM_EMAIL" EnvCorsoM365TestTeamSiteID = "CORSO_M365_TEST_TEAM_SITE_ID" EnvCorsoSecondaryM365TestTeamID = "CORSO_SECONDARY_M365_TEST_TEAM_ID" EnvCorsoM365TestGroupID = "CORSO_M365_TEST_GROUP_ID" EnvCorsoSecondaryM365TestGroupID = "CORSO_SECONDARY_M365_TEST_GROUP_ID" EnvCorsoM365TestUserID = "CORSO_M365_TEST_USER_ID" EnvCorsoSecondaryM365TestSiteID = "CORSO_SECONDARY_M365_TEST_SITE_ID" EnvCorsoSecondaryM365TestUserID = "CORSO_SECONDARY_M365_TEST_USER_ID" EnvCorsoTertiaryM365TestUserID = "CORSO_TERTIARY_M365_TEST_USER_ID" EnvCorsoTestConfigFilePath = "CORSO_TEST_CONFIG_FILE" EnvCorsoUnlicensedM365TestUserID = "CORSO_M365_TEST_UNLICENSED_USER" )
test specific env vars
const ( // commonly used drive names LibraryDocuments = "Documents" LibraryMoreDocuments = "More Documents" )
SharePoint
Variables ¶
var M365AcctCredEnvs = []string{ credentials.AzureClientID, credentials.AzureClientSecret, }
Functions ¶
func GetM365SiteID ¶
GetM365SiteID returns a siteID string representing the m365SiteID described by either the env var CORSO_M365_TEST_SITE_ID, the corso_test.toml config file or the default value (in that order of priority). The default is a last-attempt fallback that will only work on alcion's testing org.
func GetM365TeamID ¶
GetM365TeamID returns a groupID string representing the m365TeamID described by either the env var CORSO_M365_TEST_TEAM_ID, the corso_test.toml config file or the default value (in that order of priority). The default is a last-attempt fallback that will only work on alcion's testing org.
func GetM365TeamSiteID ¶
GetM365TeamSiteID returns a site ID string representing the m365TeamSiteID described by either the env var CORSO_M365_TEST_TEAM_SITE_ID, the corso_test.toml config file or the default value (in that order of priority). The default is a last-attempt fallback that will only work on alcion's testing org.
func GetM365TenantID ¶
M365TenantID returns a tenantID string representing the azureTenantID described by either the env var AZURE_TENANT_ID, the corso_test.toml config file or the default value (in that order of priority). The default is a last-attempt fallback that will only work on alcion's testing org.
func GetM365UserID ¶
GetM365UserID returns an userID string representing the m365UserID described by either the env var CORSO_M365_TEST_USER_ID, the corso_test.toml config file or the default value (in that order of priority). The default is a last-attempt fallback that will only work on alcion's testing org.
func LoadTestM365OrgSites ¶
expects cfg value to be a string representing an array such as: ["site1\,uuid","site2\,uuid"] the delimiter must be a |.
func LoadTestM365OrgUsers ¶
expects cfg value to be a string representing an array such as: ["foo@example.com","bar@example.com"] the delimiter may be either a , or |.
func LoadTestM365SiteID ¶
LoadTestM365SiteID returns a siteID string representing the m365SiteID described by either the env var CORSO_M365_LOAD_TEST_SITE_ID, the corso_test.toml config file or the default value (in that order of priority). The default is a last-attempt fallback that will only work on alcion's testing org.
func LoadTestM365UserID ¶
LoadTestM365UserID returns an userID string representing the m365UserID described by either the env var CORSO_M365_LOAD_TEST_USER_ID, the corso_test.toml config file or the default value (in that order of priority). The default is a last-attempt fallback that will only work on alcion's testing org.
func M365GroupID ¶
M365GroupID returns a groupID string representing the m365GroupID described by either the env var CORSO_M365_TEST_GROUP_ID, the corso_test.toml config file or the default value (in that order of priority). The default is a last-attempt fallback that will only work on alcion's testing org. NOTE: This Group will not have a Team associated with it.
func M365SiteID ¶
M365SiteID returns a siteID string representing the m365SiteID described by either the env var CORSO_M365_TEST_SITE_ID, the corso_test.toml config file or the default value (in that order of priority). The default is a last-attempt fallback that will only work on alcion's testing org.
func M365SiteURL ¶
M365SiteURL returns a site webURL string representing the m365SiteURL described by either the env var CORSO_M365_TEST_SITE_URL, the corso_test.toml config file or the default value (in that order of priority). The default is a last-attempt fallback that will only work on alcion's testing org.
func M365TeamEmail ¶
M365TeamEmail returns a teamEmail string representing the m365TeamsEmail described by either the env var CORSO_M365_TEST_TEAM_EMAIL, the corso_test.toml config file or the default value (in that order of priority) and should belong the same group as the one represented by CORSO_M365_TEST_TEAM_ID. The default is a last-attempt fallback that will only work on alcion's testing org.
func M365TeamID ¶
M365TeamID returns a teamID string representing the m365TeamsID described by either the env var CORSO_M365_TEST_TEAM_ID, the corso_test.toml config file or the default value (in that order of priority). The default is a last-attempt fallback that will only work on alcion's testing org.
func M365TenantID ¶
M365TenantID returns a tenantID string representing the azureTenantID described by either the env var AZURE_TENANT_ID, the corso_test.toml config file or the default value (in that order of priority). The default is a last-attempt fallback that will only work on alcion's testing org.
func M365UserID ¶
M365UserID returns an userID string representing the m365UserID described by either the env var CORSO_M365_TEST_USER_ID, the corso_test.toml config file or the default value (in that order of priority). The default is a last-attempt fallback that will only work on alcion's testing org.
func MakeTempTestConfigClone ¶
MakeTempTestConfigClone makes a copy of the test config file in a temp directory. This allows tests which interface with reading and writing to a config file (such as the CLI) to safely manipulate file contents without amending the user's original file.
Attempts to copy values sourced from the caller's test config file. The overrides prop replaces config values with the provided value.
Returns a filepath string pointing to the location of the temp file.
func NewM365Account ¶
NewM365Account returns an account.Account object initialized with environment variables used for integration tests that use the m365 Controller.
func NewTestViper ¶
func ReadTestConfig ¶
reads a corso configuration file with values specific to local integration test controls. Populates values with defaults where standard.
func SecondaryM365SiteID ¶
SecondaryM365SiteID returns a siteID string representing the secondarym365SiteID described by either the env var CORSO_SECONDARY_M365_TEST_SITE_ID, the corso_test.toml config file or the default value (in that order of priority). The default is a last-attempt fallback that will only work on alcion's testing org.
func SecondaryM365TeamID ¶
SecondaryM365TeamID returns a teamID string representing the secondarym365TeamID described by either the env var CORSO_SECONDARY_M365_TEST_TEAM_ID, the corso_test.toml config file or the default value (in that order of priority). The default is a last-attempt fallback that will only work on alcion's testing org.
func SecondaryM365UserID ¶
SecondaryM365UserID returns an userID string representing the m365UserID described by either the env var CORSO_SECONDARY_M365_TEST_USER_ID, the corso_test.toml config file or the default value (in that order of priority). The default is a last-attempt fallback that will only work on alcion's testing org.
func TertiaryM365UserID ¶
TertiaryM365UserID returns an userID string representing the m365UserID described by either the env var CORSO_TERTIARY_M365_TEST_USER_ID, the corso_test.toml config file or the default value (in that order of priority). The default is a last-attempt fallback that will only work on alcion's testing org.
func UnlicensedM365UserID ¶
UnlicensedM365UserID returns an userID string representing the m365UserID described by either the env var CORSO_M365_TEST_UNLICENSED_USER, the corso_test.toml config file or the default value (in that order of priority). The default is a last-attempt fallback that will only work on alcion's testing org.
Types ¶
This section is empty.