|
8 | 8 | import requests
|
9 | 9 |
|
10 | 10 | from tests.containers import conftest, docker_utils
|
| 11 | +from tests.containers.architecture_utils import ( |
| 12 | + get_architecture_limitation_reason, |
| 13 | + is_feature_supported, |
| 14 | +) |
11 | 15 | from tests.containers.workbenches.workbench_image_test import WorkbenchContainer
|
12 | 16 |
|
13 | 17 |
|
@@ -56,16 +60,12 @@ def test_spinner_html_loaded(self, jupyterlab_image: conftest.Image) -> None:
|
56 | 60 |
|
57 | 61 | @allure.issue("RHOAIENG-16568")
|
58 | 62 | @allure.description("Check that PDF export is working correctly")
|
59 |
| - def test_pdf_export(self, jupyterlab_image: conftest.Image) -> None: |
| 63 | + def test_pdf_export(self, jupyterlab_image: conftest.Image, container_architecture) -> None: |
| 64 | + # Skip if PDF export is not supported on this architecture |
| 65 | + if not is_feature_supported(container_architecture, "pdf_export"): |
| 66 | + reason = get_architecture_limitation_reason(container_architecture, "pdf_export") |
| 67 | + pytest.skip(f"PDF export functionality is not supported on {container_architecture} architecture: {reason}") |
60 | 68 | container = WorkbenchContainer(image=jupyterlab_image.name, user=4321, group_add=[0])
|
61 |
| - # Skip if we're running on s390x architecture |
62 |
| - container.start(wait_for_readiness=False) |
63 |
| - try: |
64 |
| - exit_code, arch_output = container.exec(["uname", "-m"]) |
65 |
| - if exit_code == 0 and arch_output.decode().strip() == "s390x": |
66 |
| - pytest.skip("PDF export functionality is not supported on s390x architecture") |
67 |
| - finally: |
68 |
| - docker_utils.NotebookContainer(container).stop(timeout=0) |
69 | 69 | test_file_name = "test.ipybn"
|
70 | 70 | test_file_content = """{
|
71 | 71 | "cells": [
|
|
0 commit comments