From eb77307b63e48ec9e986317bed3b2bfd4b35c838 Mon Sep 17 00:00:00 2001 From: Andreea-Lupu Date: Mon, 22 Aug 2022 20:45:39 +0300 Subject: [PATCH] fix chart version from pushpull.bats Signed-off-by: Andreea-Lupu --- test/blackbox/pushpull.bats | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/blackbox/pushpull.bats b/test/blackbox/pushpull.bats index e14a3d3c..aaeaa807 100644 --- a/test/blackbox/pushpull.bats +++ b/test/blackbox/pushpull.bats @@ -122,12 +122,14 @@ function teardown_file() { @test "push helm chart" { run helm package ${BATS_FILE_TMPDIR}/helm-charts/charts/zot [ "$status" -eq 0 ] - run helm push zot-0.1.0.tgz oci://localhost:8080/zot-chart + local chart_version=$(awk '/version/{printf $2}' ${BATS_FILE_TMPDIR}/helm-charts/charts/zot/Chart.yaml) + run helm push zot-${chart_version}.tgz oci://localhost:8080/zot-chart [ "$status" -eq 0 ] } @test "pull helm chart" { - run helm pull oci://localhost:8080/zot-chart/zot --version 0.1.0 + local chart_version=$(awk '/version/{printf $2}' ${BATS_FILE_TMPDIR}/helm-charts/charts/zot/Chart.yaml) + run helm pull oci://localhost:8080/zot-chart/zot --version ${chart_version} [ "$status" -eq 0 ] }