Skip to content

Commit 309835f

Browse files
committedDec 7, 2024·
Acutally fix lint errors
1 parent 16798da commit 309835f

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed
 

‎Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ check-linter-version:
2727

2828
## test: Executes any tests.
2929
test:
30-
go test -race -timeout 60s ./...
30+
go test -timeout 60s ./...
3131

3232
## lint: Runs the linters.
3333
lint: linter-config check-linter-version

‎examples/example.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import ldap from 'k6/x/ldap'
55
// It's a good idea not to open a connection per VU unless you specifically want to test that
66
const ldapUrl = 'ldap://localhost:1389'
77
console.log(`Dialing LDAP URL: ${ldapUrl}`)
8-
let ldapConn = ldap.dialUrl(ldapUrl)
8+
let ldapConn = ldap.dialURL(ldapUrl)
99

1010
let bindDn = 'cn=admin,dc=example,dc=org'
1111
let bindPassword = 'adminpassword'

‎ldap.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Wraps ldap.v3 for xk6 extension
1+
// Package ldap wraps ldap.v3 for xk6 extension
22
package ldap
33

44
import (
@@ -13,7 +13,7 @@ func init() {
1313
type Ldap struct {
1414
}
1515

16-
func (l *Ldap) DialUrl(addr string) (*Conn, error) {
16+
func (l *Ldap) DialURL(addr string) (*Conn, error) {
1717
c, err := ldap.DialURL(addr)
1818
if err != nil {
1919
return nil, err
@@ -57,7 +57,8 @@ func (l *Ldap) NewSearchRequest(
5757
typesOnly := false
5858
control := []ldap.Control{}
5959

60-
lsr := ldap.NewSearchRequest(baseDn, _scope, derefAliases, sizeLimit, timeLimit, typesOnly, filter, attributes, control)
60+
lsr := ldap.NewSearchRequest(baseDn, _scope, derefAliases,
61+
sizeLimit, timeLimit, typesOnly, filter, attributes, control)
6162

6263
return lsr
6364
}
@@ -85,9 +86,7 @@ func (c *Conn) Search(searchRequest *ldap.SearchRequest) (*ldap.SearchResult, er
8586
}
8687

8788
return result, nil
88-
8989
}
90-
9190
func (c *Conn) Close() {
9291
c.conn.Close()
9392
}

‎test/test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
make test
4+
make build
55

66
podman compose -f test/compose.yaml up --force-recreate -d
77
# TODO some way to check LDAP container is ready

0 commit comments

Comments
 (0)
Please sign in to comment.