Error if acceptance tests are targeting github or cli orgs

This commit is contained in:
William Martin 2024-10-11 17:51:17 +02:00
parent f9b24990d6
commit fd66555510

View file

@ -141,6 +141,10 @@ func (e *testScriptEnv) fromEnv() error {
return missingEnvError{missingEnvs: missingEnvs}
}
if envMap["GH_ACCEPTANCE_ORG"] == "github" || envMap["GH_ACCEPTANCE_ORG"] == "cli" {
return fmt.Errorf("GH_ACCEPTANCE_ORG cannot be 'github' or 'cli'")
}
e.host = envMap["GH_ACCEPTANCE_HOST"]
e.org = envMap["GH_ACCEPTANCE_ORG"]
e.token = envMap["GH_ACCEPTANCE_TOKEN"]