From b3d7c0337c37e21ca40090aa2733856255829330 Mon Sep 17 00:00:00 2001 From: Artem Yevsiukov Date: Tue, 27 Aug 2024 12:13:54 +0300 Subject: [PATCH] updated tests --- katib-ui-rock/rockcraft.yaml | 9 +++++---- katib-ui-rock/tests/test_rock.py | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/katib-ui-rock/rockcraft.yaml b/katib-ui-rock/rockcraft.yaml index d34101f..7fa5b59 100644 --- a/katib-ui-rock/rockcraft.yaml +++ b/katib-ui-rock/rockcraft.yaml @@ -67,7 +67,7 @@ parts: override-prime: | mkdir -p $CRAFT_PRIME/app/build - cp -r $CRAFT_PART_BUILD/dist/static $CRAFT_PRIME/app/build + cp -r $CRAFT_PART_BUILD/dist/static $CRAFT_PRIME/app/build/static backend: plugin: go @@ -77,7 +77,7 @@ parts: build-snaps: # Use go version that satisfies requirements in # https://github.com/kubeflow/katib/blob/v0.17.0/docs/developer-guide.md#requirements - - go/1.22/stable + - go/1.21/stable build-environment: - CGO_ENABLED: 0 - GOOS: linux @@ -102,8 +102,9 @@ parts: security-team-requirement: plugin: nil override-build: | + # security requirement + # there are no packages installed in `bare` base which is used in this rock mkdir -p ${CRAFT_PART_INSTALL}/usr/share/rocks - (echo "# os-release" && cat /etc/os-release && echo "# dpkg-query" && \ - dpkg-query --root=${CRAFT_PROJECT_DIR}/../bundles/ubuntu-22.04/rootfs/ -f '${db:Status-Abbrev},${binary:Package},${Version},${source:Package},${Source:Version}\n' -W) \ + (echo "# os-release" && cat /etc/os-release && echo "# dpkg-query") \ > ${CRAFT_PART_INSTALL}/usr/share/rocks/dpkg.query diff --git a/katib-ui-rock/tests/test_rock.py b/katib-ui-rock/tests/test_rock.py index aa2c1d1..f2aefe3 100644 --- a/katib-ui-rock/tests/test_rock.py +++ b/katib-ui-rock/tests/test_rock.py @@ -59,7 +59,8 @@ def test_rock(rock_test_env): "run", LOCAL_ROCK_IMAGE, "exec", - "cat", + "ls", + "-la" "/app/build/static", ], check=True,