From 6ee6a6809f1879121d6765906c98802e3bc22db5 Mon Sep 17 00:00:00 2001 From: Trevor Cooper Date: Wed, 23 Aug 2023 21:05:57 -0700 Subject: [PATCH] use kswitch instead of kinit Co-Authored by: Louis Abel --- tests/role_deploy_domain_controller.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/role_deploy_domain_controller.pm b/tests/role_deploy_domain_controller.pm index ce2a8a9d..9146bb63 100644 --- a/tests/role_deploy_domain_controller.pm +++ b/tests/role_deploy_domain_controller.pm @@ -119,7 +119,7 @@ sub run { assert_script_run "printf 'correcthorse\nbatterystaple\nbatterystaple' | kinit test2\@$ipa_realm"; # add a sudo rule - assert_script_run "echo '$ipa_admin_password' | kinit admin"; + assert_script_run "kswitch -p admin@$ipa_realm"; assert_script_run 'ipa sudorule-add testrule --desc="Test rule in IPA" --hostcat=all --cmdcat=all --runasusercat=all --runasgroupcat=all'; assert_script_run 'ipa sudorule-add-user testrule --users="test1"'; validate_script_output 'ipa sudorule-show testrule', sub { $_ =~ m/Rule name: testrule/ };