-
Notifications
You must be signed in to change notification settings - Fork 166
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
Conversation
ocs_ci/ocs/constants.py
Outdated
@@ -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") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
ocs_ci/ocs/constants.py
Outdated
@@ -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") |
There was a problem hiding this comment.
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
""" | ||
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(): |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
Signed-off-by: oviner <oviner@redhat.com>
Signed-off-by: oviner <oviner@redhat.com>
Signed-off-by: oviner <oviner@redhat.com>
There was a problem hiding this 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).
There was a problem hiding this 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).
There was a problem hiding this 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
@skipif_ocs_version("<4.15") | ||
@pytest.mark.polarion_id("OCS-5502") | ||
@skipif_external_mode | ||
def test_recovery_from_volume_deletion_cli_tool( |
There was a problem hiding this comment.
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.
[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 |
https://bugzilla.redhat.com/show_bug.cgi?id=2234479
Test path: