Skip to content

Commit

Permalink
Fixes integration tests
Browse files Browse the repository at this point in the history
The bitnami helm chart requires the image registry to be separated from
the image name. Without this, it would try to use something like the
following as an image name: docker.io/ghcr.io/repository/multus:tag,
which is incorrect.

The integration tests currently work if the rock image is published on
docker.io, but not on ghcr.io.
  • Loading branch information
claudiubelu committed Jul 26, 2024
1 parent 607cd6e commit 1b24789
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/integration/test_multus_v4_0_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,20 @@ def test_multus_deployment(module_instance: harness.Instance):
IMG_NAME, "v4.0.2", IMG_PLATFORM
)

# This helm chart requires the registry to be separated from the image.
rock_image = rock.image
registry = "docker.io"
parts = rock_image.split("/")
if len(parts) > 1:
registry = parts[0]
rock_image = "/".join(parts[1:])

helm_command = k8s_util.get_helm_install_command(
name=INSTALL_NAME,
chart_name="oci://registry-1.docker.io/bitnamicharts/multus-cni",
images=[k8s_util.HelmImage(uri=rock.image)],
images=[k8s_util.HelmImage(uri=rock_image)],
namespace=constants.K8S_NS_KUBE_SYSTEM,
set_configs=[f"image.registry={registry}"],
chart_version="2.1.7",
)
module_instance.exec(helm_command)
Expand Down

0 comments on commit 1b24789

Please sign in to comment.