From d4397324176be2e062396a9d0023c9b1be8f63a3 Mon Sep 17 00:00:00 2001 From: Ahmet DEMIR Date: Wed, 16 Sep 2020 15:20:20 +0200 Subject: [PATCH] Remove env var and add skipfunc for ee tests --- .github/workflows/acceptance-tests.yml | 2 -- gitlab/resource_gitlab_project_test.go | 12 ++++-------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/acceptance-tests.yml b/.github/workflows/acceptance-tests.yml index dd6cce513..23675bfb1 100644 --- a/.github/workflows/acceptance-tests.yml +++ b/.github/workflows/acceptance-tests.yml @@ -21,7 +21,6 @@ jobs: echo "::set-env name=MAKE_TARGET::testacc" echo "::set-env name=GO_FLAGS::-mod=vendor" echo "::set-env name=GO111MODULE::on" - echo "::set-env name=GITLAB_EE::no" echo "::set-env name=GITLAB_TOKEN::20char-testing-token" echo "::set-env name=GITLAB_BASE_URL::http://127.0.0.1:8080/api/v4" @@ -59,7 +58,6 @@ jobs: echo "::set-env name=MAKE_TARGET::testacc" echo "::set-env name=GO_FLAGS::-mod=vendor" echo "::set-env name=GO111MODULE::on" - echo "::set-env name=GITLAB_EE::yes" echo "::set-env name=GITLAB_TOKEN::20char-testing-token" echo "::set-env name=GITLAB_BASE_URL::http://127.0.0.1:8080/api/v4" echo "::set-env name=TF_LOG::DEBUG" diff --git a/gitlab/resource_gitlab_project_test.go b/gitlab/resource_gitlab_project_test.go index 08104999e..aa6737498 100644 --- a/gitlab/resource_gitlab_project_test.go +++ b/gitlab/resource_gitlab_project_test.go @@ -229,9 +229,6 @@ func TestAccGitlabProject_templateName(t *testing.T) { } func TestAccGitlabProject_templateNameCustom(t *testing.T) { - if v := os.Getenv("GITLAB_EE"); v == "no" { - return - } var project gitlab.Project rInt := acctest.RandInt() @@ -241,7 +238,8 @@ func TestAccGitlabProject_templateNameCustom(t *testing.T) { CheckDestroy: testAccCheckGitlabProjectDestroy, Steps: []resource.TestStep{ { - Config: testAccGitlabProjectConfigTemplateNameCustom(rInt), + Config: testAccGitlabProjectConfigTemplateNameCustom(rInt), + SkipFunc: isRunningInCE, Check: resource.ComposeTestCheckFunc( testAccCheckGitlabProjectExists("gitlab_project.template-name-custom", &project), testAccCheckGitlabProjectDefaultBranch(&project, &testAccGitlabProjectExpectedAttributes{ @@ -254,9 +252,6 @@ func TestAccGitlabProject_templateNameCustom(t *testing.T) { } func TestAccGitlabProject_templateProjectID(t *testing.T) { - if v := os.Getenv("GITLAB_EE"); v == "no" { - return - } var project gitlab.Project rInt := acctest.RandInt() @@ -266,7 +261,8 @@ func TestAccGitlabProject_templateProjectID(t *testing.T) { CheckDestroy: testAccCheckGitlabProjectDestroy, Steps: []resource.TestStep{ { - Config: testAccGitlabProjectConfigTemplateProjectID(rInt), + Config: testAccGitlabProjectConfigTemplateProjectID(rInt), + SkipFunc: isRunningInCE, Check: resource.ComposeTestCheckFunc( testAccCheckGitlabProjectExists("gitlab_project.template-id", &project), testAccCheckGitlabProjectDefaultBranch(&project, &testAccGitlabProjectExpectedAttributes{