From 6f70272bc36cbcb09104ce833f1235d575a58c86 Mon Sep 17 00:00:00 2001
From: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Date: Mon, 15 Feb 2021 16:46:33 +0100
Subject: [PATCH] test(connector/ldap): remove ldap test gate

Now that the ldap tests don't create containers on the fly
they can run the same way as other integration tests.

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
---
 .github/workflows/ci.yaml   | 1 -
 connector/ldap/ldap_test.go | 8 --------
 2 files changed, 9 deletions(-)

diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index bdbd62bd..f24d92a8 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -71,7 +71,6 @@ jobs:
           DEX_POSTGRES_HOST: localhost
           DEX_POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}
           DEX_ETCD_ENDPOINTS: http://localhost:${{ job.services.etcd.ports[2379] }}
-          DEX_LDAP_TESTS: 1
           DEX_LDAP_HOST: localhost
           DEX_LDAP_PORT: 389
           DEX_LDAP_TLS_PORT: 636
diff --git a/connector/ldap/ldap_test.go b/connector/ldap/ldap_test.go
index 1c2d595b..61383924 100644
--- a/connector/ldap/ldap_test.go
+++ b/connector/ldap/ldap_test.go
@@ -13,8 +13,6 @@ import (
 	"github.com/dexidp/dex/connector"
 )
 
-const envVar = "DEX_LDAP_TESTS"
-
 // connectionMethod indicates how the test should connect to the LDAP server.
 type connectionMethod int32
 
@@ -527,13 +525,7 @@ func getenv(key, defaultVal string) string {
 //
 // The tests require LDAP to be runnning.
 // You can use the provided docker-compose file to setup an LDAP server.
-//
-// The DEX_LDAP_TESTS must be set to "1"
 func runTests(t *testing.T, connMethod connectionMethod, config *Config, tests []subtest) {
-	if os.Getenv(envVar) != "1" {
-		t.Skipf("%s not set. Skipping test (run 'export %s=1' to run tests)", envVar, envVar)
-	}
-
 	// Shallow copy.
 	c := *config
 
-- 
GitLab