mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-11 21:02:34 +00:00
CI: Add setup function to doc test script
Create a `setup()` function in the test script used to test the install documents. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
parent
e74c431d7c
commit
8334d90979
@ -6,12 +6,23 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# The go binary isn't installed, but we checkout the repos to the standard
|
||||||
|
# golang locations.
|
||||||
|
export GOPATH=${GOPATH:-${HOME}/go}
|
||||||
|
|
||||||
info()
|
info()
|
||||||
{
|
{
|
||||||
local msg="$*"
|
local msg="$*"
|
||||||
echo "INFO: $msg"
|
echo "INFO: $msg"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setup()
|
||||||
|
{
|
||||||
|
source /etc/os-release || source /usr/lib/os-release
|
||||||
|
|
||||||
|
mkdir -p "${GOPATH}"
|
||||||
|
}
|
||||||
|
|
||||||
# Run the kata manager to "execute" the install guide to ensure the commands
|
# Run the kata manager to "execute" the install guide to ensure the commands
|
||||||
# it specified result in a working system.
|
# it specified result in a working system.
|
||||||
test_distro_install_guide()
|
test_distro_install_guide()
|
||||||
@ -23,8 +34,6 @@ test_distro_install_guide()
|
|||||||
|
|
||||||
[ ! -e "$GOPATH" ] && die "cannot find $mgr"
|
[ ! -e "$GOPATH" ] && die "cannot find $mgr"
|
||||||
|
|
||||||
source /etc/os-release
|
|
||||||
|
|
||||||
info "Installing system from the $ID install guide"
|
info "Installing system from the $ID install guide"
|
||||||
|
|
||||||
$mgr install-docker-system
|
$mgr install-docker-system
|
||||||
@ -95,4 +104,5 @@ check_install_docs()
|
|||||||
run_tests
|
run_tests
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setup
|
||||||
check_install_docs
|
check_install_docs
|
||||||
|
Loading…
Reference in New Issue
Block a user