summaryrefslogtreecommitdiff
path: root/src/test/ldap/t/001_auth.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ldap/t/001_auth.pl')
-rw-r--r--src/test/ldap/t/001_auth.pl11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/test/ldap/t/001_auth.pl b/src/test/ldap/t/001_auth.pl
index a7cac6210b5..38760ece617 100644
--- a/src/test/ldap/t/001_auth.pl
+++ b/src/test/ldap/t/001_auth.pl
@@ -2,7 +2,7 @@ use strict;
use warnings;
use TestLib;
use PostgresNode;
-use Test::More tests => 14;
+use Test::More tests => 15;
my ($slapd, $ldap_bin_dir, $ldap_schema_dir);
@@ -175,3 +175,12 @@ $node->reload;
$ENV{"PGPASSWORD"} = 'secret1';
test_access($node, 'test1', 0, 'combined LDAP URL and search filter');
+
+note "diagnostic message";
+
+unlink($node->data_dir . '/pg_hba.conf');
+$node->append_conf('pg_hba.conf', qq{local all all ldap ldapserver=$ldap_server ldapport=$ldap_port ldapprefix="uid=" ldapsuffix=",dc=example,dc=net" ldaptls=1});
+$node->reload;
+
+$ENV{"PGPASSWORD"} = 'secret1';
+test_access($node, 'test1', 2, 'any attempt fails due to unsupported TLS');