From 78e987225169ce6b497473eefb4b0aac6e53a305 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Fri, 11 Feb 2022 11:27:10 -0500 Subject: [PATCH] ldap.t: write the password to an external .conf file --- t/Hydra/Controller/User/ldap.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/Hydra/Controller/User/ldap.t b/t/Hydra/Controller/User/ldap.t index 19e7825a..175b66aa 100644 --- a/t/Hydra/Controller/User/ldap.t +++ b/t/Hydra/Controller/User/ldap.t @@ -25,7 +25,12 @@ $ldap->add_group("hydra_restart-jobs", $users->{"many_roles"}->{"username"}); $ldap->add_group("hydra_bump-to-front", $users->{"many_roles"}->{"username"}); $ldap->add_group("hydra_cancel-build", $users->{"many_roles"}->{"username"}); + my $ctx = test_context( + before_init => sub { + my ($ctx) = @_; + write_file($ctx->{"tmpdir"} . "/password.conf", "bindpw = ${\$ldap->{'root_password'}}"); + }, hydra_config => < @@ -42,7 +47,7 @@ my $ctx = test_context( debug = 0 binddn = "cn=root,dc=example" - bindpw = notapassword + include password.conf start_tls = 0 verify = none