Skip to content

Commit

Permalink
ci: Add new e2e-as-container script
Browse files Browse the repository at this point in the history
I plan to set this up to run as part of our Prow builds to help
test coreos#3280
  • Loading branch information
cgwalters committed Dec 16, 2021
1 parent 8b37ace commit 6c5a271
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions ci/prow/e2e-as-container.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# Today, this runs as part of the coreos-assembler container with
# the latest rpm-ostree binary installed. In the future it
# should derive from an "ostree native container"; see
# https://github.com/ostreedev/ostree-rs-ext/#module-container-bridging-between-ostree-and-ocidocker-images
set -xeuo pipefail

fatal ()
{
echo "$0: fatal: $*" >&2
exit 1
}

# For now, we're just testing that `rpm-ostree install foo` will fail.

if rpm-ostree install cowsay 2>err.txt; then
fatal "install worked unexpectedly"
fi
if ! grep -qF 'This system was not booted via libostree' err.txt; then
cat err.txt
fatal "Should have found container error"
fi
echo "ok install in container"

0 comments on commit 6c5a271

Please sign in to comment.