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

Fix test for provider server logs #10541

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def test_provider_server_logs(self):
consumer_names = managedservice.get_consumer_names()
for consumer_name in consumer_names:
expected_log = (
f'successfully Enabled the StorageConsumer resource "{consumer_name}"'
f"successfully updated Status for StorageConsumer {consumer_name}"
)
log_found = False
for line in log_lines:
Expand Down Expand Up @@ -123,12 +123,18 @@ def test_ceph_clients(self):
]
== consumer_name
):
found_client = (
f"{cephclient['metadata']['annotations']['ocs.openshift.io.storageclaim']}-"
f"{cephclient['metadata']['annotations']['ocs.openshift.io.cephusertype']}"
)
log.info(f"Ceph client {found_client} for {consumer_name} found")
found_clients.append(found_client)
try:
found_client = (
f"{cephclient['metadata']['annotations']['ocs.openshift.io.storageclaim']}-"
f"{cephclient['metadata']['annotations']['ocs.openshift.io.cephusertype']}"
)
log.info(
f"Ceph client {found_client} for {consumer_name} found"
)
found_clients.append(found_client)
except KeyError as err:
Copy link
Contributor

Choose a reason for hiding this comment

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

we need to have assertion on this I think.
If you don’t want to fail test in the middle and collect results of all checks please follow the test_dashboard_validation_ui example: save results of this check along with others to the dict and validate in the end of the test

log.error(f"Unexpected structure of cephclient yaml: {err}")

for client in {
"rbd-provisioner",
"rbd-node",
Expand Down
Loading