Skip to content

Commit 9c9bf7f

Browse files
committed
Enable LDAP Link tests for EE
1 parent e4e3d2c commit 9c9bf7f

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

internal/provider/resource_gitlab_group_ldap_link_test.go

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func TestAccGitlabGroupLdapLink_basic(t *testing.T) {
2828

2929
// Create a group LDAP link as a developer (uses testAccGitlabGroupLdapLinkCreateConfig for Config)
3030
{
31-
SkipFunc: testAccGitlabGroupLdapLinkSkipFunc(testLdapLink.CN, testLdapLink.Provider),
31+
SkipFunc: isRunningInCE,
3232
Config: testAccGitlabGroupLdapLinkCreateConfig(rInt, &testLdapLink),
3333
Check: resource.ComposeTestCheckFunc(
3434
testAccCheckGitlabGroupLdapLinkExists("gitlab_group_ldap_link.foo", &ldapLink),
@@ -39,7 +39,7 @@ func TestAccGitlabGroupLdapLink_basic(t *testing.T) {
3939

4040
// Update the group LDAP link to change the access level (uses testAccGitlabGroupLdapLinkUpdateConfig for Config)
4141
{
42-
SkipFunc: testAccGitlabGroupLdapLinkSkipFunc(testLdapLink.CN, testLdapLink.Provider),
42+
SkipFunc: isRunningInCE,
4343
Config: testAccGitlabGroupLdapLinkUpdateConfig(rInt, &testLdapLink),
4444
Check: resource.ComposeTestCheckFunc(
4545
testAccCheckGitlabGroupLdapLinkExists("gitlab_group_ldap_link.foo", &ldapLink),
@@ -50,7 +50,7 @@ func TestAccGitlabGroupLdapLink_basic(t *testing.T) {
5050

5151
// Force create the same group LDAP link in a different resource (uses testAccGitlabGroupLdapLinkForceCreateConfig for Config)
5252
{
53-
SkipFunc: testAccGitlabGroupLdapLinkSkipFunc(testLdapLink.CN, testLdapLink.Provider),
53+
SkipFunc: isRunningInCE,
5454
Config: testAccGitlabGroupLdapLinkForceCreateConfig(rInt, &testLdapLink),
5555
Check: resource.ComposeTestCheckFunc(
5656
testAccCheckGitlabGroupLdapLinkExists("gitlab_group_ldap_link.bar", &ldapLink),
@@ -62,16 +62,6 @@ func TestAccGitlabGroupLdapLink_basic(t *testing.T) {
6262
})
6363
}
6464

65-
func testAccGitlabGroupLdapLinkSkipFunc(testCN string, testProvider string) func() (bool, error) {
66-
return func() (bool, error) {
67-
if testCN == "default" || testProvider == "default" {
68-
return true, nil
69-
}
70-
71-
return isRunningInCE()
72-
}
73-
}
74-
7565
func testAccCheckGitlabGroupLdapLinkExists(resourceName string, ldapLink *gitlab.LDAPGroupLink) resource.TestCheckFunc {
7666
return func(s *terraform.State) error {
7767
// Clear the "found" LDAP link before checking for existence

0 commit comments

Comments
 (0)