Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test CLI tool for disk replacement proceudre #9655

Merged
merged 6 commits into from
May 13, 2024

Conversation

OdedViner
Copy link
Contributor

@OdedViner OdedViner commented Apr 9, 2024

https://bugzilla.redhat.com/show_bug.cgi?id=2234479
Test path:

tests/functional/z_cluster/nodes/test_disk_failures.py::TestDiskFailures::test_recovery_from_volume_deletion_cli_tool

@OdedViner OdedViner requested a review from a team as a code owner April 9, 2024 11:08
@pull-request-size pull-request-size bot added the size/L PR that changes 100-499 lines label Apr 9, 2024
@OdedViner OdedViner requested review from DanielOsypenko and petr-balogh and removed request for DanielOsypenko April 9, 2024 11:09
@@ -75,6 +75,7 @@
TEMPLATE_CNV_VM_WORKLOAD_DIR, "vm-standalone-pvc"
)
DATA_DIR = os.getenv("OCSCI_DATA_DIR") or os.path.join(TOP_DIR, "data")
BIN_DIR = os.path.join(TOP_DIR, "bin")
Copy link
Member

Choose a reason for hiding this comment

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

nope, bin dir is not from TOP_DIR directory, we already have bin dir define in config, so it should be directly used from config value

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -1602,7 +1603,7 @@
# Miscellaneous
NOOBAA_OPERATOR_POD_CLI_PATH = "/usr/local/bin/noobaa-operator"
NOOBAA_OPERATOR_LOCAL_CLI_PATH = os.path.join(DATA_DIR, "mcg-cli")
CLI_TOOL_LOCAL_PATH = os.path.join(DATA_DIR, "odf-cli")
CLI_TOOL_LOCAL_PATH = os.path.join(BIN_DIR, "odf-cli")
Copy link
Member

Choose a reason for hiding this comment

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

you are not using it anywhere in this PR right?
But I see references in ocs_ci/helpers/helpers.py .

So please change it there, to use directly path of bin dir (config.RUN['bin_dir']) from config we talked yesterday.

As it will be in the path, I think that you will really need anywhere else the full path as you will be able to just run directly odf-cli

@OdedViner OdedViner requested a review from a team as a code owner April 15, 2024 21:48
@OdedViner OdedViner changed the title WIP: Test CLI tool for disk replacement proceudre Test CLI tool for disk replacement proceudre Apr 21, 2024
@PrasadDesala PrasadDesala added team/e2e E2E team related issues/PRs Customer defects Defects automated aspart of GSS closed loop labels May 3, 2024
"""
Handle interactive prompts with answers during subctl command

Args:
cmd(str): Command to be executed
prompts_answers(dict): Prompts as keys and answers as values
timeout(int): Timeout in seconds, for pexpect to wait for prompt

string_answer (bool): string answer
raise_exception (bool): raise excption
Raises:
InteractivePromptException: in case something goes wrong

"""
child = pexpect.spawn(cmd)
for prompt, answer in prompts_answers.items():
Copy link
Member

Choose a reason for hiding this comment

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

can we add a condition when there are no prompts?

Copy link
Contributor Author

@OdedViner OdedViner May 9, 2024

Choose a reason for hiding this comment

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

in this case, we dont need to use this function

Copy link

@ocs-ci ocs-ci left a comment

Choose a reason for hiding this comment

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

PR validation on existing cluster

Cluster Name: oviner7-may
Cluster Configuration:
PR Test Suite: tier4a
PR Test Path: tests/functional/z_cluster/nodes/test_disk_failures.py::TestDiskFailures::test_recovery_from_volume_deletion_cli_tool
Additional Test Params:
OCP VERSION: 4.16
OCS VERSION: 4.16
tested against branch: master

Job UNSTABLE (some or all tests failed).

Copy link

@ocs-ci ocs-ci left a comment

Choose a reason for hiding this comment

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

PR validation on existing cluster

Cluster Name: oviner7-may
Cluster Configuration:
PR Test Suite: tier4a
PR Test Path: tests/functional/z_cluster/nodes/test_disk_failures.py::TestDiskFailures::test_recovery_from_volume_deletion_cli_tool
Additional Test Params:
OCP VERSION: 4.16
OCS VERSION: 4.16
tested against branch: master

Job UNSTABLE (some or all tests failed).

Copy link

@ocs-ci ocs-ci left a comment

Choose a reason for hiding this comment

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

PR validation

Cluster Name:
Cluster Configuration:
PR Test Suite: tier4a
PR Test Path: tests/functional/z_cluster/nodes/test_disk_failures.py::TestDiskFailures::test_recovery_from_volume_deletion_cli_tool
Additional Test Params:
OCP VERSION: 4.16
OCS VERSION: 4.16
tested against branch: master

Job PASSED.

@skipif_ocs_version("<4.15")
@pytest.mark.polarion_id("OCS-5502")
@skipif_external_mode
def test_recovery_from_volume_deletion_cli_tool(
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to still test both scenarios, mean without CLI Tool? As the TC test_recovery_from_volume_deletion will still get triggered as well.

Copy link

openshift-ci bot commented May 13, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: OdedViner, petr-balogh, shivamdurgbuns, yitzhak12

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@petr-balogh petr-balogh merged commit 670d9b7 into red-hat-storage:master May 13, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer defects Defects automated aspart of GSS closed loop lgtm size/L PR that changes 100-499 lines team/e2e E2E team related issues/PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants