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>
This commit is contained in:
Mark Sagi-Kazar 2021-02-15 16:46:33 +01:00
parent f11db50369
commit 6f70272bc3
No known key found for this signature in database
GPG Key ID: 34CC109EB5ED1C2A
2 changed files with 0 additions and 9 deletions

View File

@ -71,7 +71,6 @@ jobs:
DEX_POSTGRES_HOST: localhost DEX_POSTGRES_HOST: localhost
DEX_POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }} DEX_POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}
DEX_ETCD_ENDPOINTS: http://localhost:${{ job.services.etcd.ports[2379] }} DEX_ETCD_ENDPOINTS: http://localhost:${{ job.services.etcd.ports[2379] }}
DEX_LDAP_TESTS: 1
DEX_LDAP_HOST: localhost DEX_LDAP_HOST: localhost
DEX_LDAP_PORT: 389 DEX_LDAP_PORT: 389
DEX_LDAP_TLS_PORT: 636 DEX_LDAP_TLS_PORT: 636

View File

@ -13,8 +13,6 @@ import (
"github.com/dexidp/dex/connector" "github.com/dexidp/dex/connector"
) )
const envVar = "DEX_LDAP_TESTS"
// connectionMethod indicates how the test should connect to the LDAP server. // connectionMethod indicates how the test should connect to the LDAP server.
type connectionMethod int32 type connectionMethod int32
@ -527,13 +525,7 @@ func getenv(key, defaultVal string) string {
// //
// The tests require LDAP to be runnning. // The tests require LDAP to be runnning.
// You can use the provided docker-compose file to setup an LDAP server. // 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) { 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. // Shallow copy.
c := *config c := *config