mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-30 09:13:29 +00:00
tests: cleanup bats tests
Removed redundant `function` keyword and extraneous blank lines. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
parent
2569cfa34c
commit
60e1e7bc31
@ -4,7 +4,6 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
|
||||||
rootfs_sh="$BATS_TEST_DIRNAME/../rootfs-builder/rootfs.sh"
|
rootfs_sh="$BATS_TEST_DIRNAME/../rootfs-builder/rootfs.sh"
|
||||||
image_builder_sh="$BATS_TEST_DIRNAME/../image-builder/image_builder.sh"
|
image_builder_sh="$BATS_TEST_DIRNAME/../image-builder/image_builder.sh"
|
||||||
initrd_builder_sh="$BATS_TEST_DIRNAME/../initrd-builder/initrd_builder.sh"
|
initrd_builder_sh="$BATS_TEST_DIRNAME/../initrd-builder/initrd_builder.sh"
|
||||||
@ -13,7 +12,6 @@ tmp_rootfs="${tmp_dir}/rootfs-osbuilder"
|
|||||||
#FIXME: Remove image size after https://github.com/kata-containers/osbuilder/issues/25 is fixed
|
#FIXME: Remove image size after https://github.com/kata-containers/osbuilder/issues/25 is fixed
|
||||||
readonly image_size=400
|
readonly image_size=400
|
||||||
|
|
||||||
|
|
||||||
setup()
|
setup()
|
||||||
{
|
{
|
||||||
export USE_DOCKER=true
|
export USE_DOCKER=true
|
||||||
@ -25,7 +23,7 @@ teardown(){
|
|||||||
rm -rf "${tmp_dir}"
|
rm -rf "${tmp_dir}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_rootfs()
|
build_rootfs()
|
||||||
{
|
{
|
||||||
local file="/var/lib/osbuilder/osbuilder.yaml"
|
local file="/var/lib/osbuilder/osbuilder.yaml"
|
||||||
local full="${tmp_rootfs}${file}"
|
local full="${tmp_rootfs}${file}"
|
||||||
@ -35,17 +33,17 @@ function build_rootfs()
|
|||||||
yamllint "${full}"
|
yamllint "${full}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_image()
|
build_image()
|
||||||
{
|
{
|
||||||
sudo -E ${image_builder_sh} -s ${image_size} -o "${tmp_dir}/image.img" "${tmp_rootfs}"
|
sudo -E ${image_builder_sh} -s ${image_size} -o "${tmp_dir}/image.img" "${tmp_rootfs}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_initrd()
|
build_initrd()
|
||||||
{
|
{
|
||||||
sudo -E ${initrd_builder_sh} -o "${tmp_dir}/initrd-image.img" "${tmp_rootfs}"
|
sudo -E ${initrd_builder_sh} -o "${tmp_dir}/initrd-image.img" "${tmp_rootfs}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_rootfs_image_initrd()
|
build_rootfs_image_initrd()
|
||||||
{
|
{
|
||||||
distro="$1"
|
distro="$1"
|
||||||
image="$2"
|
image="$2"
|
||||||
|
Loading…
Reference in New Issue
Block a user