|
9 | 9 |
|
10 | 10 | from tests.containers import conftest, docker_utils
|
11 | 11 | from tests.containers.workbenches.workbench_image_test import WorkbenchContainer
|
12 |
| - |
| 12 | +from tests.containers.architecture_utils import (is_feature_supported, get_architecture_limitation_reason, container_architecture) |
13 | 13 |
|
14 | 14 | class TestJupyterLabImage:
|
15 | 15 | """Tests for JupyterLab Workbench images in this repository."""
|
@@ -56,16 +56,12 @@ def test_spinner_html_loaded(self, jupyterlab_image: conftest.Image) -> None:
|
56 | 56 |
|
57 | 57 | @allure.issue("RHOAIENG-16568")
|
58 | 58 | @allure.description("Check that PDF export is working correctly")
|
59 |
| - def test_pdf_export(self, jupyterlab_image: conftest.Image) -> None: |
| 59 | + def test_pdf_export(self, jupyterlab_image: conftest.Image, container_architecture) -> None: |
| 60 | + # Skip if PDF export is not supported on this architecture |
| 61 | + if not is_feature_supported(container_architecture,"pdf_export"): |
| 62 | + reason = get_architecture_limitation_reason(container_architecture, "pdf_export") |
| 63 | + pytest.skip(f"PDF export functionality is not supported on {container_architecture} architecture: {reason}") |
60 | 64 | 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 | 65 | test_file_name = "test.ipybn"
|
70 | 66 | test_file_content = """{
|
71 | 67 | "cells": [
|
|
0 commit comments