diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0ea01b98d00d73909773f6150fdaa1a0873fde45..3fa95864c16eb7087979b1391c26510b8ee411ec 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -71,6 +71,7 @@ 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: yes 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 613839247fb576212c81092e79b1c6afcb96105c..8c1eec4b36392b70eeb10a8e079e247fc235886d 100644 --- a/connector/ldap/ldap_test.go +++ b/connector/ldap/ldap_test.go @@ -526,6 +526,10 @@ 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. func runTests(t *testing.T, connMethod connectionMethod, config *Config, tests []subtest) { + if os.Getenv("DEX_LDAP_TESTS") == "" { + t.Skip("Specify not-empty DEX_LDAP_TESTS env variable to enable LDAP tests") + } + // Shallow copy. c := *config