Skip to content

Commit

Permalink
add testing defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
ltcarbonell committed May 2, 2023
1 parent c95acc8 commit 5edd22c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion builtin/credential/ldap/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,9 @@ func TestLdapAuthBackend_ConfigUpgrade(t *testing.T) {
falseBool := new(bool)
*falseBool = false

maxPageInt := new(int)
*maxPageInt = 1000

exp := &ldapConfigEntry{
TokenParams: tokenutil.TokenParams{
TokenPeriod: 5 * time.Minute,
Expand All @@ -1243,7 +1246,7 @@ func TestLdapAuthBackend_ConfigUpgrade(t *testing.T) {
ConnectionTimeout: cfg.ConnectionTimeout,
UsernameAsAlias: false,
DerefAliases: "never",
MaximumPageSize: 1000,
MaximumPageSize: maxPageInt,
},
}

Expand Down
4 changes: 3 additions & 1 deletion helper/testhelpers/ldap/ldaphelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ func PrepareTestContainer(t *testing.T, version string) (cleanup func(), cfg *ld
cfg.GroupDN = "ou=people,dc=planetexpress,dc=com"
cfg.GroupAttr = "cn"
cfg.RequestTimeout = 60
*cfg.MaximumPageSize = 1000

maxPageSize := 1000
cfg.MaximumPageSize = &maxPageSize

svc, err := runner.StartService(context.Background(), func(ctx context.Context, host string, port int) (docker.ServiceConfig, error) {
connURL := fmt.Sprintf("ldap://%s:%d", host, port)
Expand Down

0 comments on commit 5edd22c

Please sign in to comment.