Skip to content

Commit 555e4be

Browse files
committed
Skip tests when running against CE since only EE supports LDAP links.
1 parent 3233172 commit 555e4be

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

gitlab/resource_gitlab_group_ldap_link_test.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ func TestAccGitlabGroupLdapLink_basic(t *testing.T) {
2929
t.Skipf("[WARNING] Skipping test until test data is configured in %s.", testDataFile)
3030
} else {
3131
resource.Test(t, resource.TestCase{
32-
//PreCheck: func() {testAccPreCheck(t)},
3332
Providers: testAccProviders,
3433
CheckDestroy: testAccCheckGitlabGroupLdapLinkDestroy,
3534
Steps: []resource.TestStep{
3635

3736
// Create a group LDAP link as a developer (uses testAccGitlabGroupLdapLinkCreateConfig for Config)
3837
{
39-
Config: testAccGitlabGroupLdapLinkCreateConfig(rInt, &testLdapLink),
38+
SkipFunc: isRunningInCE,
39+
Config: testAccGitlabGroupLdapLinkCreateConfig(rInt, &testLdapLink),
4040
Check: resource.ComposeTestCheckFunc(
4141
testAccCheckGitlabGroupLdapLinkExists("gitlab_group_ldap_link.foo", &ldapLink),
4242
testAccCheckGitlabGroupLdapLinkAttributes(&ldapLink, &testAccGitlabGroupLdapLinkExpectedAttributes{
@@ -46,7 +46,8 @@ func TestAccGitlabGroupLdapLink_basic(t *testing.T) {
4646

4747
// Update the group LDAP link to change the access level (uses testAccGitlabGroupLdapLinkUpdateConfig for Config)
4848
{
49-
Config: testAccGitlabGroupLdapLinkUpdateConfig(rInt, &testLdapLink),
49+
SkipFunc: isRunningInCE,
50+
Config: testAccGitlabGroupLdapLinkUpdateConfig(rInt, &testLdapLink),
5051
Check: resource.ComposeTestCheckFunc(
5152
testAccCheckGitlabGroupLdapLinkExists("gitlab_group_ldap_link.foo", &ldapLink),
5253
testAccCheckGitlabGroupLdapLinkAttributes(&ldapLink, &testAccGitlabGroupLdapLinkExpectedAttributes{
@@ -56,7 +57,8 @@ func TestAccGitlabGroupLdapLink_basic(t *testing.T) {
5657

5758
// Force create the same group LDAP link in a different resource (uses testAccGitlabGroupLdapLinkForceCreateConfig for Config)
5859
{
59-
Config: testAccGitlabGroupLdapLinkForceCreateConfig(rInt, &testLdapLink),
60+
SkipFunc: isRunningInCE,
61+
Config: testAccGitlabGroupLdapLinkForceCreateConfig(rInt, &testLdapLink),
6062
Check: resource.ComposeTestCheckFunc(
6163
testAccCheckGitlabGroupLdapLinkExists("gitlab_group_ldap_link.bar", &ldapLink),
6264
testAccCheckGitlabGroupLdapLinkAttributes(&ldapLink, &testAccGitlabGroupLdapLinkExpectedAttributes{

0 commit comments

Comments
 (0)