def test_create_java_stop_cmd(self): port = "20000" flexmock(appscale_info).should_receive('get_private_ip')\ .and_return('<private_ip>') cmd = app_manager_server.create_java_stop_cmd(port) self.assertIn(port, cmd) # Test with a numeric port instead of a string port = 20000 cmd = app_manager_server.create_java_stop_cmd(port) self.assertIn(str(port), cmd)
def test_create_java_stop_cmd(self): fake_secret = "XXXXXX" port = "20000" flexmock(appscale_info).should_receive("get_secret").and_return(fake_secret) flexmock(appscale_info).should_receive("get_private_ip").and_return("<private_ip>") cmd = app_manager_server.create_java_stop_cmd(port) self.assertIn(port, cmd) # Test with a numeric port instead of a string port = 20000 cmd = app_manager_server.create_java_stop_cmd(port) self.assertIn(str(port), cmd)
def test_create_java_stop_cmd(self): fake_secret = "XXXXXX" port = "20000" flexmock(appscale_info).should_receive('get_secret')\ .and_return(fake_secret) flexmock(appscale_info).should_receive('get_private_ip')\ .and_return('<private_ip>') cmd = app_manager_server.create_java_stop_cmd(port) assert port in cmd assert fake_secret in cmd assert 'kill' in cmd # Test with a numerial port instead of a string port = 20000 cmd = app_manager_server.create_java_stop_cmd(port) assert str(port) in cmd
def test_create_java_stop_cmd(self): fake_secret = "XXXXXX" port = "20000" flexmock(appscale_info).should_receive('get_secret')\ .and_return(fake_secret) flexmock(appscale_info).should_receive('get_private_ip')\ .and_return('<private_ip>') cmd = app_manager_server.create_java_stop_cmd(port) assert port in cmd assert fake_secret in cmd assert 'kill' in cmd # Test with a numerial port instead of a string port = 20000 cmd = app_manager_server.create_python_stop_cmd(port, 'python') assert str(port) in cmd