Skip to content

Commit

Permalink
ci: Enable kata agent api tests
Browse files Browse the repository at this point in the history
This commit enables running tests for kata agent apis.
The 'api-tests' directory will contain bats test files for
individual APIs.

Fixes kata-containers#10269

Signed-off-by: Sumedh Alok Sharma <sumsharma@microsoft.com>
  • Loading branch information
Sumynwa committed Sep 5, 2024
1 parent cc9aeee commit e1ac2f4
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/basic-ci-amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ jobs:
run: bash tests/functional/kata-agent-apis/gha-run.sh install-dependencies

- name: get-kata-tarball
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: kata-static-tarball-amd64${{ inputs.tarball-suffix }}
path: kata-artifacts
Expand Down
20 changes: 20 additions & 0 deletions tests/functional/kata-agent-apis/api-tests/dummy.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bats

# Copyright (c) 2024 Microsoft Corporation
#
# SPDX-License-Identifier: Apache-2.0

load "${BATS_TEST_DIRNAME}/../../../common.bash"
load "${BATS_TEST_DIRNAME}/../setup_common.sh"

setup_file() {
info "setup"
}

@test "Dummy test" {
info "placeholder"
}

teardown_file() {
info "teardown"
}
2 changes: 1 addition & 1 deletion tests/functional/kata-agent-apis/gha-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function install_dependencies() {
}

function run() {
exit 0
bash -c ${kata_agent_apis_dir}/run-agent-api-tests.sh
}

function main() {
Expand Down
4 changes: 3 additions & 1 deletion tests/functional/kata-agent-apis/run-agent-api-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ EOF
}

run_tests() {
info "placeholder: no tests"
info "Running agent API tests"

bats "${kata_agent_apis_dir}/api-tests"
}

main()
Expand Down

0 comments on commit e1ac2f4

Please sign in to comment.