#NEWLINE# def test_install_interactive_with_ips( self ) : #NEWLINE# #INDENT# installer = StandalonePrestoInstaller ( self ) #NEWLINE# ips = self . cluster . get_ip_address_dict ( ) #NEWLINE# rpm_name = installer . copy_presto_rpm_to_master ( ) #NEWLINE# self . write_test_configs ( self . cluster ) #NEWLINE# additional_keywords = { #NEWLINE# #INDENT# 'rpm' : rpm_name , #NEWLINE# 'master_ip' : ips [ self . cluster . master ] , #NEWLINE# 'slave1_ip' : ips [ self . cluster . slaves [ 0 ] ] , #NEWLINE# #UNINDENT# } #NEWLINE# cmd_output = self . run_script_from_prestoadmin_dir ( 'echo -e "root\n22\n%(master_ip)s\n%(slave1_ip)s\n" | ./presto-admin server install /mnt/presto-admin/%(rpm)s ' , ** additional_keywords ) . splitlines ( ) #NEWLINE# expected = [ 'Enter user name for SSH connection to all nodes: \\[root\\] Enter port number for SSH connections to all nodes: \\[22\\] Enter host name or IP address for coordinator node. Enter an external host name or ip address if this is a multi-node cluster: \\[localhost\\] Enter host names or IP addresses for worker nodes separated by spaces: \\[localhost\\] Deploying rpm on .*\\.\\.\\.' , ( 'Package deployed successfully on: ' + ips [ self . cluster . master ] ) , ( 'Package installed successfully on: ' + ips [ self . cluster . master ] ) , ( 'Package deployed successfully on: ' + ips [ self . cluster . slaves [ 0 ] ] ) , ( 'Package installed successfully on: ' + ips [ self . cluster . slaves [ 0 ] ] ) , ( 'Deploying configuration on: ' + ips [ self . cluster . master ] ) , ( 'Deploying tpch.properties connector configurations on: ' + ips [ self . cluster . master ] ) , ( 'Deploying configuration on: ' + cmd_output [ self . cluster . slaves [ 0 ] ] ) , ( 'Deploying tpch.properties connector configurations on: ' + ips [ self . cluster . slaves [ 0 ] ] ) , 'Deploying rpm on .*\\.\\.\\.' ] #NEWLINE# cmd_output . sort ( ) #NEWLINE# expected . sort ( ) #NEWLINE# for ( expected_regexp , actual_line ) in zip ( expected , cmd_output ) : #NEWLINE# #INDENT# self . assertRegexpMatches ( actual_line , expected_regexp ) #NEWLINE# #UNINDENT# self . assert_installed_with_regex_configs ( self . cluster . master , [ self . cluster . slaves [ 0 ] ] )