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

[action] [PR:16684] Skip kubesonic test case for public branch #16798

Merged
merged 1 commit into from
Feb 7, 2025
Merged
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
10 changes: 10 additions & 0 deletions tests/kubesonic/test_k8s_join_disjoin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from datetime import datetime
from tests.common.helpers.assertions import pytest_assert
from tests.common.utilities import get_image_type

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -41,6 +42,14 @@ def check_dut_k8s_version_supported(duthost):
logger.info(f"K8s version {k8s_version} is supported")


def check_image_type_supported(duthost):
logger.info("Check if the image type is supported")
image_type = get_image_type(duthost)
if image_type == "public":
pytest.skip("Kubesonic test cases are not supported on public image")
logger.info(f"Image type {image_type} is supported")


def download_minikube(vmhost, creds):
logger.info("Start to download minikube")
minikube_url = f"https://github.com/kubernetes/minikube/releases/download/{MINIKUBE_VERSION}/minikube-linux-amd64"
Expand Down Expand Up @@ -268,6 +277,7 @@ def clean_configdb_k8s_table(duthost):

@pytest.fixture()
def setup_and_teardown(duthost, vmhost, creds):
check_image_type_supported(duthost)
check_dut_k8s_version_supported(duthost)
logger.info("Start to setup test environment")

Expand Down
Loading