@@ -886,13 +886,15 @@ def test_positive_ansible_dynamic_inventory(
886886 )
887887 assert sync_response .ok
888888 wait_for (
889- lambda : rhel_contenthost .hostname
890- in [
891- host ['name' ]
892- for host in aap_client .get (
893- f'{ api_base } inventories/{ inv_list ["results" ][0 ]["id" ]} /hosts/?search={ rhel_contenthost .hostname } '
894- ).json ()['results' ]
895- ],
889+ lambda : (
890+ rhel_contenthost .hostname
891+ in [
892+ host ['name' ]
893+ for host in aap_client .get (
894+ f'{ api_base } inventories/{ inv_list ["results" ][0 ]["id" ]} /hosts/?search={ rhel_contenthost .hostname } '
895+ ).json ()['results' ]
896+ ]
897+ ),
896898 timeout = 180 ,
897899 delay = 30 ,
898900 )
@@ -1003,8 +1005,10 @@ def test_positive_ansible_provisioning_callback(
10031005 # Host should do call back to the Satellite reporting
10041006 # the result of the installation. Wait until Satellite reports that the host is installed.
10051007 wait_for (
1006- lambda : sat .cli .Host .info ({'name' : hostname })['status' ]['build-status' ]
1007- != 'Pending installation' ,
1008+ lambda : (
1009+ sat .cli .Host .info ({'name' : hostname })['status' ]['build-status' ]
1010+ != 'Pending installation'
1011+ ),
10081012 timeout = 1800 ,
10091013 delay = 30 ,
10101014 )
@@ -1038,13 +1042,15 @@ def test_positive_ansible_provisioning_callback(
10381042 assert sync_response .ok
10391043
10401044 wait_for (
1041- lambda : hostname
1042- in [
1043- host ['name' ]
1044- for host in aap_client .get (
1045- f'{ api_base } inventories/{ inv_list ["results" ][0 ]["id" ]} /hosts/?search={ hostname } '
1046- ).json ()['results' ]
1047- ],
1045+ lambda : (
1046+ hostname
1047+ in [
1048+ host ['name' ]
1049+ for host in aap_client .get (
1050+ f'{ api_base } inventories/{ inv_list ["results" ][0 ]["id" ]} /hosts/?search={ hostname } '
1051+ ).json ()['results' ]
1052+ ]
1053+ ),
10481054 timeout = 180 ,
10491055 delay = 30 ,
10501056 )
@@ -1060,10 +1066,10 @@ def test_positive_ansible_provisioning_callback(
10601066 # when the callback service is started, the job sometimes starts with pending or waiting state before going to the running state
10611067 filtered_job = jobs ['id' ] if jobs ['status' ] in ('running' , 'pending' , 'waiting' ) else None
10621068 wait_for (
1063- lambda : aap_client . get ( f' { api_base } jobs/?id= { filtered_job } ' ). json ()[ 'results' ][ 0 ][
1064- ' status'
1065- ]
1066- == 'successful' ,
1069+ lambda : (
1070+ aap_client . get ( f' { api_base } jobs/?id= { filtered_job } ' ). json ()[ 'results' ][ 0 ][ ' status']
1071+ == 'successful'
1072+ ) ,
10671073 timeout = 120 ,
10681074 )
10691075 # Verify user rocket and package tmux is installed via ansible-callback on provisioning host
0 commit comments