Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Dict Str Str Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr ListLoad Str Expr Call AttributeLoad NameLoad attr Assert UnaryOpNot AttributeLoad NameLoad attr decorator_list Call NameLoad Str Call NameLoad Str Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str ListLoad Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str ListLoad Str Expr Call AttributeLoad NameLoad attr Assert AttributeLoad NameLoad attr decorator_list Call NameLoad Str Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index Str ListLoad Str Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr Assert AttributeLoad NameLoad attr decorator_list Call NameLoad Str Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign NameStore Dict Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore AttributeLoad NameLoad attr attr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Str NameLoad decorator_list Call NameLoad Str Call NameLoad Str Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Str Assign NameStore Dict Str Str Dict Str Str ListLoad Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad decorator_list Call NameLoad Str Call NameLoad Str FunctionDef arguments args NameParam defaults body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A N/A 
Tests deploying the presto configuration
 mock patch fabric.api env prestoadmin deploy tests.base_test_case BaseTestCase tests.unit SudoResult TestDeploy N/A BaseTestCase N/A test_output_format_dict N/A N/A self N/A N/A N/A conf N/A a c b d N/A N/A N/A self assertEqual N/A N/A deploy output_format conf a=b
c=d N/A test_output_format_list N/A N/A self N/A N/A N/A N/A N/A self assertEqual N/A N/A deploy output_format N/A a b a
b N/A test_output_format_string N/A N/A self N/A N/A N/A conf A string N/A N/A N/A self assertEqual N/A N/A deploy output_format conf conf N/A test_output_format_int N/A N/A self N/A N/A N/A conf 1 N/A N/A N/A self assertEqual N/A N/A deploy output_format conf N/A str conf N/A test_worker_is_coordinator N/A N/A self env_mock coord_mock configure_mock N/A N/A N/A N/A env_mock host my.host N/A N/A coord_mock return_value N/A my.host N/A N/A N/A deploy workers N/A N/A N/A configure_mock called N/A N/A patch prestoadmin.deploy.configure_presto N/A patch prestoadmin.deploy.util.get_coordinator_role N/A patch prestoadmin.deploy.env test_worker_not_coordinator N/A N/A self configure_mock get_conf_mock N/A N/A N/A N/A env host my.host1 N/A N/A N/A env roledefs N/A worker N/A my.host1 N/A N/A N/A env roledefs N/A coordinator N/A my.host2 N/A N/A N/A deploy workers N/A N/A configure_mock called N/A N/A patch prestoadmin.deploy.w.Worker N/A patch prestoadmin.deploy.configure_presto test_coordinator N/A N/A self coord_mock configure_mock N/A N/A N/A N/A N/A env roledefs N/A coordinator N/A master N/A N/A env host master N/A N/A N/A deploy coordinator N/A N/A configure_mock called N/A N/A patch prestoadmin.deploy.configure_presto N/A patch prestoadmin.deploy.coord.Coordinator test_deploy N/A N/A self sudo_mock N/A N/A N/A N/A sudo_mock return_value N/A SudoResult N/A files N/A jvm.config a=b N/A N/A N/A deploy deploy files /my/remote/dir N/A N/A N/A sudo_mock assert_any_call mkdir -p /my/remote/dir N/A N/A N/A sudo_mock assert_any_call echo 'a=b' > /my/remote/dir/jvm.config N/A N/A patch prestoadmin.deploy.sudo test_deploy_node_properties N/A N/A self sudo_mock append_mock open_mock N/A N/A N/A N/A sudo_mock return_value N/A SudoResult N/A file_manager N/A N/A N/A open_mock return_value __enter__ return_value N/A N/A N/A file_manager read return_value key=value N/A command if ! ( grep -q -s 'node.id' /my/remote/dir/node.properties ); then uuid=$(uuidgen); echo node.id=$uuid >> /my/remote/dir/node.properties;fi; sed -i '/node.id/!d' /my/remote/dir/node.properties;  N/A N/A N/A deploy deploy_node_properties key=value /my/remote/dir N/A N/A N/A sudo_mock assert_called_with command N/A N/A N/A append_mock assert_called_with /my/remote/dir/node.properties key=value True N/A N/A patch __builtin__.open N/A patch prestoadmin.deploy.files.append N/A patch prestoadmin.deploy.sudo test_configure_presto N/A N/A self deploy_node_mock deploy_mock N/A N/A N/A N/A env host localhost N/A conf N/A node.properties jvm.config N/A key value N/A list N/A remote_dir /my/remote/dir N/A N/A N/A deploy configure_presto conf remote_dir N/A N/A N/A deploy_mock assert_called_with N/A jvm.config list remote_dir N/A N/A patch prestoadmin.deploy.deploy N/A patch prestoadmin.deploy.deploy_node_properties test_escape_quotes_do_nothing N/A N/A self N/A N/A N/A text basic_text N/A N/A N/A self assertEqual basic_text N/A N/A deploy escape_single_quotes text N/A test_escape_quotes_has_quote N/A N/A self N/A N/A N/A text A quote! ' A quote! N/A N/A N/A self assertEqual A quote! '\'' A quote! N/A N/A deploy escape_single_quotes text N/A N/A