Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[1LP][WIP] New Test:: Testing Restart Appliance command using appliance console #9775

Closed

Conversation

dgaikwad
Copy link
Contributor

@dgaikwad dgaikwad commented Dec 17, 2019

Purpose or Intent

  • Adding new testcase which tests EVM service start and stop command result via application console

PRT Run

{{pytest: cfme/tests/cli/test_appliance_console.py::test_appliance_console_restart -vv}}

@dgaikwad dgaikwad changed the title [WIPTEST] New Test:: Cheking EVM service start and stop command [RFR] New Test:: Testing EVM service start and stop command Dec 17, 2019
Copy link
Contributor

@valaparthvi valaparthvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test LGTM, just 2 changes.
I think we've missed this in your other PRs, but if you are the FA owner of a test case, you should change the assignee name to yours in the Polarion doc block to.

appliance.appliance_console.run_commands(cmd_stop_EVM, timeout=90)
# Checking EVM service stoppped or not
wait_for(
lambda: not appliance.is_web_ui_running(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you should be using lambda here since you're calling a function.
You can simply do wait_for(appliance.is_web_ui_running, fail_condition=True, ...).
Using fail_condition=True here is equivalent to using not appliance.is_web_ui_running().

Copy link
Contributor Author

@dgaikwad dgaikwad Dec 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting below error if I do not use lambda.

>           f_code = func.__code__
E           AttributeError: 'bool' object has no attribute '__code__'

.cfme_venv/lib64/python3.7/site-packages/wait_for/__init__.py:64: AttributeError


Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will change assignee shortly

appliance.appliance_console.run_commands(cmd_start_EVM, timeout=90)
# Checking EVM service started or not
wait_for(
lambda: appliance.is_web_ui_running(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above. Simply using wait_for(appliance.is_web_ui_running, ....) would do the trick.

@pytest.mark.tier(2)
def test_appliance_console_restart():
def test_appliance_console_restart(appliance):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this TC means restart appliance via appliance console

  1. Restart Appliance

We do not have any CLI option to restart the EVM Server Processes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mnadeem92 you are right, We do not have restart command so performed stop and start operation as per steps mentioned in the testcase,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mnadeem92 As per our offline discussion I am going to implement this TC using option 18. Restart Appliance to restart the appliace.

@valaparthvi valaparthvi changed the title [RFR] New Test:: Testing EVM service start and stop command [WIPTEST] New Test:: Testing EVM service start and stop command Dec 17, 2019
@valaparthvi valaparthvi added the test-automation To be applied on PR's which are automating existing manual cases label Dec 17, 2019
@dgaikwad dgaikwad force-pushed the test_appliance_console_restart branch from c4eee82 to b2f7154 Compare December 17, 2019 13:19
@dgaikwad dgaikwad changed the title [WIPTEST] New Test:: Testing EVM service start and stop command [WIPTEST] New Test:: Testing Restart Appliance command using appliance console Dec 18, 2019
@dgaikwad dgaikwad force-pushed the test_appliance_console_restart branch 5 times, most recently from d068267 to 3764fa7 Compare December 26, 2019 13:06
@dgaikwad dgaikwad changed the title [WIPTEST] New Test:: Testing Restart Appliance command using appliance console [RFR] New Test:: Testing Restart Appliance command using appliance console Dec 26, 2019
Copy link
Member

@ganeshhubale ganeshhubale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small changes required :)

cfme/tests/cli/test_appliance_console.py Outdated Show resolved Hide resolved
cfme/tests/cli/test_appliance_console.py Outdated Show resolved Hide resolved
cfme/utils/appliance/console.py Outdated Show resolved Hide resolved
@ganeshhubale ganeshhubale changed the title [RFR] New Test:: Testing Restart Appliance command using appliance console [WIPTEST] New Test:: Testing Restart Appliance command using appliance console Dec 26, 2019
@dgaikwad dgaikwad force-pushed the test_appliance_console_restart branch from 3764fa7 to aaf941c Compare December 26, 2019 14:06
@dgaikwad dgaikwad changed the title [WIPTEST] New Test:: Testing Restart Appliance command using appliance console [RFR] New Test:: Testing Restart Appliance command using appliance console Dec 26, 2019
@ganeshhubale ganeshhubale changed the title [RFR] New Test:: Testing Restart Appliance command using appliance console [1LP][RFR] New Test:: Testing Restart Appliance command using appliance console Dec 27, 2019
@dgaikwad dgaikwad force-pushed the test_appliance_console_restart branch 3 times, most recently from 92e031a to a7304ac Compare December 30, 2019 11:12
@dgaikwad dgaikwad force-pushed the test_appliance_console_restart branch 2 times, most recently from bb03597 to 5d2cfc9 Compare December 30, 2019 12:34
@ganeshhubale ganeshhubale changed the title [1LP][RFR] New Test:: Testing Restart Appliance command using appliance console [1LP][WIPTEST] New Test:: Testing Restart Appliance command using appliance console Dec 30, 2019
@dajoRH dajoRH changed the title [1LP][WIPTEST] New Test:: Testing Restart Appliance command using appliance console [1LP][WIP] New Test:: Testing Restart Appliance command using appliance console Jan 3, 2020
@dgaikwad dgaikwad force-pushed the test_appliance_console_restart branch from 5d2cfc9 to 8f289ad Compare January 3, 2020 07:31
@dgaikwad dgaikwad changed the title [1LP][WIP] New Test:: Testing Restart Appliance command using appliance console [1LP][WIPTEST] New Test:: Testing Restart Appliance command using appliance console Jan 6, 2020
@dajoRH dajoRH added WIP-testing and removed WIP labels Jan 6, 2020
@dgaikwad dgaikwad force-pushed the test_appliance_console_restart branch from 8f289ad to f45e78d Compare January 6, 2020 06:54
@dajoRH
Copy link
Contributor

dajoRH commented Jan 6, 2020

I detected some fixture changes in commit f45e78d45592636e860df0b571901e9f503f649e

The local fixture cluster is used in the following files:

  • cfme/tests/cloud_infra_common/test_relationships.py
    • test_ssa_cluster_relationships

Please, consider creating a PRT run to make sure your fixture changes do not break existing usage 😃

@dgaikwad dgaikwad changed the title [1LP][WIPTEST] New Test:: Testing Restart Appliance command using appliance console [1LP][WIP] New Test:: Testing Restart Appliance command using appliance console Jan 7, 2020
@dajoRH dajoRH added WIP and removed WIP-testing labels Jan 7, 2020
@dgaikwad dgaikwad force-pushed the test_appliance_console_restart branch from f45e78d to 141e7a5 Compare January 7, 2020 05:43
[1LP][RFR] Automate multiple vm retirement, fix ec2 instance-backed retirement
@dgaikwad dgaikwad force-pushed the test_appliance_console_restart branch from 141e7a5 to 89d5212 Compare January 7, 2020 05:45
@dgaikwad
Copy link
Contributor Author

dgaikwad commented Jan 7, 2020

Due to some git issue my changes discarded from this PR, so closing this PR and will open new one for the same.

@dgaikwad dgaikwad closed this Jan 7, 2020
@dgaikwad
Copy link
Contributor Author

dgaikwad commented Jan 7, 2020

PR raised for the same: #9814

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lint-ok test-automation To be applied on PR's which are automating existing manual cases WIP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants