def test_create_java_start_cmd(self): flexmock(appscale_info).should_receive('get_private_ip').\ and_return('<private_ip>') flexmock(app_manager_server).should_receive('locate_dir').\ and_return('/path/to/dir/') app_id = 'testapp' cmd = app_manager_server.create_java_start_cmd(app_id, '20000', '127.0.0.2') assert app_id in cmd
def test_create_java_start_cmd(self): fake_secret = "XXXXXX" flexmock(appscale_info).should_receive("get_secret").and_return(fake_secret) flexmock(appscale_info).should_receive("get_private_ip").and_return("<private_ip>") db_locations = ["127.0.1.0", "127.0.2.0"] app_id = "testapp" cmd = app_manager_server.create_java_start_cmd(app_id, "20000", "127.0.0.2", db_locations) assert fake_secret in cmd assert app_id in cmd
def test_create_java_start_cmd(self): flexmock(app_manager_server).should_receive('find_web_inf').\ and_return('/path/to/dir/WEB-INF') app_id = 'testapp' revision_key = 'testapp_default_v1' max_heap = 260 pidfile = 'testpid' cmd = app_manager_server.create_java_start_cmd( app_id, '20000', '127.0.0.2', max_heap, pidfile, revision_key) assert app_id in cmd
def test_create_java_start_cmd(self): flexmock(app_manager_server).should_receive('find_web_inf').\ and_return('/path/to/dir/WEB-INF') app_id = 'testapp' revision_key = 'testapp_default_v1' max_heap = 260 pidfile = 'testpid' cmd = app_manager_server.create_java_start_cmd( app_id, '20000', '127.0.0.2', max_heap, pidfile, revision_key, 19999) assert app_id in cmd
def test_create_java_start_cmd(self): fake_secret = "XXXXXX" flexmock(appscale_info).should_receive('get_secret')\ .and_return(fake_secret) flexmock(appscale_info).should_receive('get_private_ip')\ .and_return('<private_ip>') db_locations = ['127.0.1.0', '127.0.2.0'] app_id = 'testapp' cmd = app_manager_server.create_java_start_cmd(app_id, '20000', '127.0.0.2', db_locations) assert fake_secret in cmd assert app_id in cmd