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

Integration test can only be executed on microk8s #106

Open
misohu opened this issue Mar 2, 2023 · 0 comments
Open

Integration test can only be executed on microk8s #106

misohu opened this issue Mar 2, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@misohu
Copy link
Member

misohu commented Mar 2, 2023

From the code in integration tests is clear that the test will only pass on microk8s environment e.g.:

async def does_minio_bucket_exist(bucket_name, ops_test: OpsTest):
    """Connects to the minio server and checks if a bucket exists, checking if a bucket exists.
    Returns:
        Tuple of the return code, stdout, and stderr
    """
    ...
    kubectl_cmd = (
        "microk8s",
        "kubectl",
        "run",
        "--rm",
        "-i",
        "--restart=Never",
        f"--namespace={ops_test.model_name}",
        this_pod_name,
        f"--env=AWS_ACCESS_KEY_ID={access_key}",
        f"--env=AWS_SECRET_ACCESS_KEY={secret_key}",
        "--image=amazon/aws-cli",
        "--command",
        "--",
        "sh",
        "-c",
        aws_cmd,
    )

    (
        ret_code,
        stdout,
        stderr,
    ) = await ops_test.run(*kubectl_cmd)
    return ret_code, stdout, stderr, " ".join(kubectl_cmd)

We should make our integration tests k8s agnostic.

@misohu misohu added the bug Something isn't working label Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant