From 24f2eb39d952da0f299a02bddf5968bec0bd2914 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 23 Mar 2018 09:18:39 -0700 Subject: [PATCH] Check for test3's existence at start of freeipa_password_change This test expects to pick up from freeipa_webui, but that test is not fatal (i.e. it can fail and we still carry on to this one). We should probably make them independent, but for now, just check if 'test3' (one of the users freeipa_webui creates and that this test requires) actually exists, at the start. If not, we can just die right away. Signed-off-by: Adam Williamson --- tests/freeipa_password_change.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/freeipa_password_change.pm b/tests/freeipa_password_change.pm index ed67cc63..d573d527 100644 --- a/tests/freeipa_password_change.pm +++ b/tests/freeipa_password_change.pm @@ -7,6 +7,10 @@ use freeipa; sub run { my $self = shift; console_login(user=>'root'); + # check whether test3 exists, i.e. whether freeipa_webui at + # least managed to create it. if not, we may as well just + # die now, this test cannot work. + assert_script_run 'getent passwd test3@DOMAIN.LOCAL'; # clear browser data so we don't go back to the 'admin' login assert_script_run 'rm -rf /root/.mozilla'; # clear kerberos ticket so we don't auto-auth as 'test4'