mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-24 06:27:39 +00:00
Since CDH/attestation related processes and its dependencies are not fully available, the setup fails to start kata-agent as local process. This fix removes these procs to prevent kata-agent from trying to start them. Signed-off-by: Sumedh Alok Sharma <sumsharma@microsoft.com>
61 lines
998 B
Bash
Executable File
61 lines
998 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Copyright (c) 2024 Microsoft Corporation
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
set -e
|
|
|
|
kata_agent_apis_dir="$(dirname "$(readlink -f "$0")")"
|
|
source "${kata_agent_apis_dir}/../../common.bash"
|
|
source "${kata_agent_apis_dir}/setup_common.sh"
|
|
|
|
usage()
|
|
{
|
|
cat <<EOF
|
|
|
|
Usage: $script_name [<command>]
|
|
|
|
Summary: Test agent ttrpc apis using agent-ctl tool.
|
|
|
|
Description: Test agent exposed ttrpc api endpoints using agent-ctl tool.
|
|
A number of variations of the inputs are used to test an inidividual api
|
|
to validate success & failure code paths.
|
|
|
|
Commands:
|
|
|
|
help - Show usage.
|
|
|
|
Notes:
|
|
- Currently, the script *does not support* running individual agent api tests.
|
|
|
|
EOF
|
|
}
|
|
|
|
run_tests() {
|
|
info "Running agent API tests"
|
|
|
|
bats "${kata_agent_apis_dir}/api-tests"
|
|
}
|
|
|
|
main()
|
|
{
|
|
local cmd="${1:-}"
|
|
|
|
case "$cmd" in
|
|
help|-h|-help|--help) usage; exit 0;;
|
|
esac
|
|
|
|
trap cleanup EXIT
|
|
|
|
install_policy_doc
|
|
|
|
try_and_remove_coco_attestation_procs
|
|
|
|
setup_agent
|
|
|
|
run_tests
|
|
}
|
|
|
|
main "$@"
|