ldap/auth: add tests for login regressions (#26327)

* ldap/auth: add tests for login regressions

Add tests to cover the regressions reported in
- https://github.com/hashicorp/vault/issues/26171
- https://github.com/hashicorp/vault/issues/26183

* fix tests; update image tag
This commit is contained in:
John-Michael Faircloth
2024-04-10 12:39:30 -05:00
committed by GitHub
parent 0445e62546
commit f2b5290bc1
6 changed files with 105 additions and 37 deletions

View File

@@ -11,6 +11,7 @@ import (
"testing"
"github.com/hashicorp/cap/ldap"
"github.com/hashicorp/vault/sdk/helper/docker"
"github.com/hashicorp/vault/sdk/helper/ldaputil"
)
@@ -23,12 +24,10 @@ func PrepareTestContainer(t *testing.T, version string) (cleanup func(), cfg *ld
}
runner, err := docker.NewServiceRunner(docker.RunOptions{
// Currently set to "michelvocks" until https://github.com/rroemhild/docker-test-openldap/pull/14
// has been merged.
ImageRepo: "docker.mirror.hashicorp.services/michelvocks/docker-test-openldap",
ImageRepo: "ghcr.io/rroemhild/docker-test-openldap",
ImageTag: version,
ContainerName: "ldap",
Ports: []string{"389/tcp"},
Ports: []string{"10389/tcp"},
// Env: []string{"LDAP_DEBUG_LEVEL=384"},
})
if err != nil {