diff --git a/cfme/tests/cli/__init__.py b/cfme/tests/cli/__init__.py index e69de29bb2..9efb8efb78 100644 --- a/cfme/tests/cli/__init__.py +++ b/cfme/tests/cli/__init__.py @@ -0,0 +1,49 @@ +from cfme.utils.version import Version +from cfme.utils.version import VersionPicker + +app_menu_v5_10 = { + "config_net": "1", + "set_timezone": "2", + "set_date_time": "3", + "create_db_bak": "4", + "create_db_dump": "5", + "restore_db_from_bak": "6", + "config_db": "7", + "config_db_rep": "8", + "logfile_conf": "9", + "config_app_db_failover_monitor": "10", + "ext_temp_storage": "11", + "config_external_auth": "12", + "update_ext_auth_opt": "13", + "gen_custom_encry_key": "14", + "harden_app_scap_config": "15", + "stop_evm": "16", + "start_evm": "17", + "restart_app": "18", + "showdown_app": "19", + "summary_info": "20", + "quit": "21", +} + +app_menu_v5_11 = { + "config_net": "1", + "create_db_bak": "2", + "create_db_dump": "3", + "restore_db_from_bak": "4", + "config_db": "5", + "config_db_rep": "6", + "logfile_conf": "7", + "config_app_db_failover_monitor": "8", + "ext_temp_storage": "9", + "config_external_auth": "10", + "update_ext_auth_opt": "11", + "gen_custom_encry_key": "12", + "harden_app_scap_config": "13", + "stop_evm": "14", + "start_evm": "15", + "restart_app": "16", + "showdown_app": "17", + "summary_info": "18", + "quit": "19", +} +app_con_menu = VersionPicker({Version.lowest(): app_menu_v5_10, "5.11": app_menu_v5_11}).pick() diff --git a/cfme/tests/cli/test_appliance_console.py b/cfme/tests/cli/test_appliance_console.py index f858d1f2ac..467378afe7 100644 --- a/cfme/tests/cli/test_appliance_console.py +++ b/cfme/tests/cli/test_appliance_console.py @@ -11,6 +11,7 @@ from widgetastic.utils import VersionPick from cfme import test_requirements +from cfme.tests.cli import app_con_menu from cfme.utils import conf from cfme.utils import os from cfme.utils.appliance.console import waiting_for_ha_monitor_started @@ -20,6 +21,7 @@ from cfme.utils.log_validator import LogValidator from cfme.utils.version import LOWEST + pytestmark = [ test_requirements.app_console, pytest.mark.uncollectif(lambda appliance: appliance.is_pod, @@ -1128,9 +1130,9 @@ def test_appliance_console_network_conf_negative(temp_appliance_preconfig_modsco "Should not able to set incorrect hostname") -@pytest.mark.manual @pytest.mark.tier(1) -def test_appliance_console_vmdb_httpd(): +@pytest.mark.meta(automates=[1337525]) +def test_appliance_console_vmdb_httpd(temp_appliance_preconfig_funcscope): """ check that httpd starts after restarting vmdb @@ -1143,8 +1145,40 @@ def test_appliance_console_vmdb_httpd(): caseimportance: low caseposneg: negative initialEstimate: 1/12h + testSteps: + 1. Stop the EVM service + 2. press "ap" + 3. press any key to continue + 4. Press "7" for "Configure Database" + 5. Press "4" for "Reset Configured Database" + 6. Press "Y" for confirmation + 7. Enter Region Number + 8. Start EVM service + expectedResults: + 1. + 2. + 3. + 4. + 5. + 6. + 7. Check "Database reset successfully" message + 8. UI should be up and running + """ - pass + appliance = temp_appliance_preconfig_funcscope + + # Stopping the EVM service + command_set = ("ap", RETURN, app_con_menu["stop_evm"], TimedCommand("Y", 120)) + appliance.appliance_console.run_commands(command_set, timeout=30) + + command_set = ("ap", RETURN, app_con_menu["config_db"], "4", "Y", TimedCommand("99", 300)) + result = appliance.appliance_console.run_commands(command_set, timeout=30) + assert "Database reset successfully" in result[-1], "DB reset failed" + + # Starting the EVM service + command_set = ("ap", RETURN, app_con_menu["start_evm"], TimedCommand("Y", 120)) + appliance.appliance_console.run_commands(command_set, timeout=30) + appliance.wait_for_web_ui() @pytest.mark.tier(2)