fix: Add test for rpm-ostree rebase (#161)
Adding this so that we can make sure that `rpm-ostree rebase` tests the arguments passed in.
This commit is contained in:
parent
f8b7334662
commit
ff05976917
2 changed files with 18 additions and 1 deletions
|
|
@ -66,8 +66,8 @@ rebase:
|
||||||
|
|
||||||
upgrade:
|
upgrade:
|
||||||
FROM +test-base
|
FROM +test-base
|
||||||
RUN mkdir -p /etc/bluebuild && touch /etc/bluebuild/cli_test.tar.gz
|
|
||||||
|
|
||||||
|
RUN mkdir -p /etc/bluebuild && touch $BB_TEST_LOCAL_IMAGE
|
||||||
RUN bluebuild -vv upgrade recipes/recipe.yml
|
RUN bluebuild -vv upgrade recipes/recipe.yml
|
||||||
|
|
||||||
secureblue-base:
|
secureblue-base:
|
||||||
|
|
@ -88,6 +88,7 @@ legacy-base:
|
||||||
|
|
||||||
test-base:
|
test-base:
|
||||||
FROM ../+blue-build-cli-alpine
|
FROM ../+blue-build-cli-alpine
|
||||||
|
ENV BB_TEST_LOCAL_IMAGE=/etc/bluebuild/cli_test.tar.gz
|
||||||
ENV CLICOLOR_FORCE=1
|
ENV CLICOLOR_FORCE=1
|
||||||
|
|
||||||
COPY ./mock-scripts/ /usr/bin/
|
COPY ./mock-scripts/ /usr/bin/
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
echo 'Running rpm-ostree'
|
echo 'Running rpm-ostree'
|
||||||
|
|
||||||
|
if [ "$1" = "rebase" ]; then
|
||||||
|
if [ "$2" = "ostree-unverified-image:oci-archive:$BB_TEST_LOCAL_IMAGE" ]; then
|
||||||
|
echo "Rebased to local image $BB_TEST_LOCAL_IMAGE"
|
||||||
|
else
|
||||||
|
echo "Failed to rebase"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
elif [ "$1" = "upgrade" ]; then
|
||||||
|
echo "Performing upgrade for $BB_TEST_LOCAL_IMAGE"
|
||||||
|
else
|
||||||
|
echo "Arg $1 is not recognized"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue