Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions integration/kubernetes/confidential/sev.bats
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,31 @@ teardown_file() {
}

setup() {
start_date=$(date +"%Y-%m-%d %H:%M:%S")
}

teardown() {
# Print the logs and cleanup resources.
echo "-- Kata logs:"
sudo journalctl -xe -t kata --since "$start_date" -n 100000

echo "-- containerd logs:"
sudo journalctl -xe -t containerd --since "$start_date" -n 100000

echo "-- Describe pods:"
esudo kubectl describe pods

echo "-- More debug:"
esudo find /run/kata-containers || true

# Remove any previous k8s test services
echo "Deleting previous test services..."
k8s_delete_all
echo "Deleting test services..."
k8s_delete_all || true

# Delete any previous data in the simple-kbs database
simple_kbs_delete_data
# Delete any data in the simple-kbs database
simple_kbs_delete_data || true
}


@test "${TEST_TAG} Test SEV unencrypted container launch success" {
# Start the service/deployment/pod
esudo kubectl apply -f "${TEST_DIR}/sev-unencrypted.yaml"
Expand Down
25 changes: 22 additions & 3 deletions integration/kubernetes/confidential/snp.bats
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,30 @@ teardown_file() {
}

setup() {
# Remove any previous k8s test services
echo "Deleting previous test services..."
k8s_delete_all
start_date=$(date +"%Y-%m-%d %H:%M:%S")
}

teardown() {
# Print the logs and cleanup resources.
echo "-- Kata logs:"
sudo journalctl -xe -t kata --since "$start_date" -n 100000

echo "-- containerd logs:"
sudo journalctl -xe -t containerd --since "$start_date" -n 100000

echo "-- Describe pods:"
esudo kubectl describe pods

echo "-- More debug:"
esudo find /run/kata-containers || true

# Remove any k8s test services
echo "Deleting test services..."
k8s_delete_all || true

# Delete any data in the simple-kbs database
simple_kbs_delete_data || true
}

@test "${TEST_TAG} Test SNP unencrypted container launch success" {
# Start the service/deployment/pod
Expand Down