From b229d2860574559414462f480e17d8a3a5cfb98c Mon Sep 17 00:00:00 2001 From: Jeremy Udit Date: Tue, 28 Jul 2020 10:06:04 -0400 Subject: [PATCH] Check For `GITHUB_ORGANIZATION` /cc https://github.com/terraform-providers/terraform-provider-github/pull/521#discussion_r461578745 --- github/provider_utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github/provider_utils.go b/github/provider_utils.go index d5fa67bd74..4f2602dc19 100644 --- a/github/provider_utils.go +++ b/github/provider_utils.go @@ -29,8 +29,8 @@ func testAccPreCheck(t *testing.T) { if v := os.Getenv("GITHUB_TOKEN"); v == "" { t.Fatal("GITHUB_TOKEN must be set for acceptance tests") } - if v := os.Getenv("GITHUB_OWNER"); v == "" { - t.Fatal("GITHUB_OWNER must be set for acceptance tests") + if v := os.Getenv("GITHUB_ORGANIZATION"); v == "" && os.Getenv("GITHUB_OWNER") == "" { + t.Fatal("GITHUB_ORGANIZATION or GITHUB_OWNER must be set for acceptance tests") } if v := os.Getenv("GITHUB_TEST_USER"); v == "" { t.Fatal("GITHUB_TEST_USER must be set for acceptance tests")