@@ -63,6 +63,10 @@ def parse_args(args):
6363    parser  =  argparse .ArgumentParser (
6464        description = "Client for executing test automation suites in ETOS" 
6565    )
66+     parser .add_argument (
67+         "cluster" ,
68+         help = "Cluster is the URL to the ETOS API." ,
69+     )
6670    parser .add_argument (
6771        "-i" ,
6872        "--identity" ,
@@ -124,11 +128,6 @@ def parse_args(args):
124128        ),
125129    )
126130
127-     parser .add_argument (
128-         "--cluster" ,
129-         default = Debug ().etos_api ,
130-         help = "Cluster should be in the form of URL to tester-api." ,
131-     )
132131    parser .add_argument (
133132        "--version" ,
134133        action = "version" ,
@@ -165,7 +164,7 @@ def check_etos_connectivity(url):
165164    :type url: str 
166165    """ 
167166    try :
168-         response  =  requests .head (url , timeout = 5 )
167+         response  =  requests .get (url , timeout = 5 )
169168        response .raise_for_status ()
170169    except  Exception  as  exception :  # pylint:disable=broad-except 
171170        raise  Exception (
@@ -273,7 +272,6 @@ def main(args):
273272    """ 
274273    args  =  parse_args (args )
275274    etos  =  ETOS ("ETOS Client" , os .getenv ("HOSTNAME" ), "ETOS Client" )
276-     os .environ ["ETOS_TESTER_API" ] =  args .cluster 
277275
278276    setup_logging (args .loglevel )
279277    info  =  generate_spinner (args .no_tty )
@@ -285,11 +283,11 @@ def main(args):
285283    etos .config .set ("dataset" , json .loads (args .dataset ))
286284
287285    with  info (text = "Checking connectivity to ETOS" , spinner = "dots" ) as  spinner :
288-         spinner .info ("Running in cluster: '{}'" .format (etos . debug . etos_api ))
286+         spinner .info ("Running in cluster: '{}'" .format (args . cluster ))
289287        spinner .info ("Configuration:" )
290288        spinner .info ("{}" .format (etos .config .config ))
291289        try :
292-             check_etos_connectivity (etos . debug . etos_api )
290+             check_etos_connectivity (f" { args . cluster } /selftest/ping" 
293291        except  Exception  as  exception :  # pylint:disable=broad-except 
294292            spinner .fail (str (exception ))
295293            sys .exit (1 )
@@ -298,7 +296,7 @@ def main(args):
298296        spinner .succeed ("Ready to launch ETOS." )
299297
300298        # Start execution 
301-         etos_client  =  ETOSClient (etos )
299+         etos_client  =  ETOSClient (etos ,  args . cluster )
302300        spinner .start ("Triggering ETOS." )
303301        success  =  etos_client .start (spinner )
304302        if  not  success :
@@ -307,6 +305,8 @@ def main(args):
307305            sys .exit (not  success )
308306        spinner .info ("Suite ID: {}" .format (etos_client .test_suite_id ))
309307        etos .config .set ("suite_id" , etos_client .test_suite_id )
308+         os .environ ["ETOS_GRAPHQL_SERVER" ] =  etos_client .event_repository 
309+         spinner .info ("Event repository: '{}'" .format (etos .debug .graphql_server ))
310310
311311        # Wait for test results 
312312        test_result_handler  =  ETOSTestResultHandler (etos )
0 commit comments