summaryrefslogtreecommitdiff
path: root/src/test/ldap
diff options
context:
space:
mode:
authorAndres Freund2021-10-19 17:14:49 +0000
committerAndres Freund2021-10-19 18:18:45 +0000
commit984f460e2f29e7ba9174cabb9f43a0d1dce543bf (patch)
tree897f647022278672b0dcd2ce91dd781ab13f8be1 /src/test/ldap
parentb4c4a00eada3c512e819e9163114a5ad1606bc7e (diff)
Adapt src/test/ldap/t/001_auth.pl to work with openldap 2.5.
ldapsearch's deprecated -h/-p arguments were removed, need to use -H now - which has been around for over 20 years. As perltidy insists on reflowing the parameters anyway, change order and "phrasing" to yield a less confusing layout (per suggestion from Tom Lane). Discussion: https://postgr.es/m/[email protected] Backpatch: 11-, where the tests were added.
Diffstat (limited to 'src/test/ldap')
-rw-r--r--src/test/ldap/t/001_auth.pl10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/test/ldap/t/001_auth.pl b/src/test/ldap/t/001_auth.pl
index f670bc5e0d5..104002d149a 100644
--- a/src/test/ldap/t/001_auth.pl
+++ b/src/test/ldap/t/001_auth.pl
@@ -130,10 +130,12 @@ while (1)
last
if (
system_log(
- "ldapsearch", "-h", $ldap_server, "-p",
- $ldap_port, "-s", "base", "-b",
- $ldap_basedn, "-D", $ldap_rootdn, "-y",
- $ldap_pwfile, "-n", "'objectclass=*'") == 0);
+ "ldapsearch", "-sbase",
+ "-H", $ldap_url,
+ "-b", $ldap_basedn,
+ "-D", $ldap_rootdn,
+ "-y", $ldap_pwfile,
+ "-n", "'objectclass=*'") == 0);
die "cannot connect to slapd" if ++$retries >= 300;
note "waiting for slapd to accept requests...";
Time::HiRes::usleep(1000000);