mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-28 16:27:50 +00:00
tests: Move osbuilder metadata var to top
Moved the variable specifying the path to the osbuilder metadata file to the top of the script and made it readonly. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
parent
c69eb00f9b
commit
1c251bdf05
@ -9,6 +9,7 @@ readonly image_builder_sh="$BATS_TEST_DIRNAME/../image-builder/image_builder.sh"
|
||||
readonly initrd_builder_sh="$BATS_TEST_DIRNAME/../initrd-builder/initrd_builder.sh"
|
||||
readonly tmp_dir=$(mktemp -t -d osbuilder-test.XXXXXXX)
|
||||
readonly tmp_rootfs="${tmp_dir}/rootfs-osbuilder"
|
||||
readonly osbuilder_file="/var/lib/osbuilder/osbuilder.yaml"
|
||||
|
||||
setup()
|
||||
{
|
||||
@ -23,8 +24,7 @@ teardown(){
|
||||
|
||||
build_rootfs()
|
||||
{
|
||||
local file="/var/lib/osbuilder/osbuilder.yaml"
|
||||
local full="${tmp_rootfs}${file}"
|
||||
local full="${tmp_rootfs}${osbuilder_file}"
|
||||
|
||||
sudo -E ${rootfs_sh} -r "${tmp_rootfs}" "${distro}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user