Skip to content

Commit

Permalink
tests/e2e: Remove kata-containers test
Browse files Browse the repository at this point in the history
Remove the kata-containers `CCv0` e2e tests in the operator
as these tests are on a dead branch of a dead repo
We also have had issues with them not being suitable as they
programmatically change the configuration, which isn't likely to work
in GHA, but isn't what we want to test either.

Later we should add an e2e smoke test that ensures that the kata-payload
integrated with things like nydus-snapshotter than the operator
is responsible for setting up and configuring as discussed in
confidential-containers#239

Signed-off-by: stevenhorsman <[email protected]>
  • Loading branch information
stevenhorsman committed Nov 29, 2023
1 parent a27d7f3 commit 23e0f4f
Showing 1 changed file with 1 addition and 45 deletions.
46 changes: 1 addition & 45 deletions tests/e2e/tests_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,10 @@ set -o pipefail
script_dir="$(dirname "$(readlink -f "$0")")"
project_dir="$(readlink -f ${script_dir}/../..)"

export GOPATH="$(mktemp -d)"
tests_repo_dir="$GOPATH/src/github.com/kata-containers/tests"
export CI=true

# TODO: Debug should be enabled in order for some tests to enable the console
# debug and search for patterns on agent logs. Probably console debug should
# be enabled always.
export DEBUG=true

# The container runtime class (e.g. kata, kata-qemu, kata-clh) test pods should
# be created with.
runtimeclass="kata-qemu"

# Tests will attempt to re-configure containerd. In our case it is already
# proper set by the operator, so let's skip that step.
export TESTS_CONFIGURE_CC_CONTAINERD=no

clone_kata_tests() {
local cc_branch="CCv0"

# TODO: checkout on the exact sha1 where the kata-deploy was created
# so that we ensure the same tests are used here.
git clone --branch="$cc_branch" \
https://github.com/kata-containers/tests "$tests_repo_dir"
}

cleanup() {
[ ! -s "/usr/local/bin/kata-runtime" ] || \
unlink /usr/local/bin/kata-runtime
rm -rf "$tests_repo_dir" || true
}

trap cleanup EXIT

parse_args() {
while getopts "hr:" opt; do
case $opt in
Expand Down Expand Up @@ -77,19 +47,7 @@ run_non_tee_tests() {
# Discussion: https://github.com/confidential-containers/operator/pull/142#issuecomment-1359349595
export AA_KBC="${aa_kbc}"

# TODO: this is a workaround for the tests that rely on `kata-runtime kata-env`
# to get the path to kata's configuration.toml and image files. Without this
# they will change the default configuration.toml, which doesn't correspond to
# the one used by the runtimeclass, therefore, performing bogus changes.
local runtime_config_file="/opt/kata/share/defaults/kata-containers/"
runtime_config_file+="configuration-${runtimeclass/kata-/}.toml"
sed -i "s#kata-runtime kata-env#kata-runtime --config $runtime_config_file kata-env#g" \
../../../lib/common.bash

bats \
"agent_image.bats" \
"agent_image_encrypted.bats" \
"${script_dir}/operator_tests.bats"
bats "${script_dir}/operator_tests.bats"

}

Expand All @@ -108,8 +66,6 @@ main() {

parse_args $@

clone_kata_tests

# This will make the pods created by the tests to use the $runtimeclass.
export RUNTIMECLASS="${runtimeclass}"

Expand Down

0 comments on commit 23e0f4f

Please sign in to comment.