Skip to content

Commit c0af18c

Browse files
Merge pull request spinframework#35 from kate-goldenring/fix-integration-tests
fix(tests): get integration tests passing
2 parents a42715e + 24644b6 commit c0af18c

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

.github/workflows/ci.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ jobs:
4242
steps:
4343
- uses: actions/checkout@v3
4444
- uses: actions/download-artifact@v3
45+
- uses: azure/setup-kubectl@v3
46+
- name: "Install dependencies"
47+
run: |
48+
sudo apt-get update
49+
sudo apt-get install -y protobuf-compiler libseccomp-dev
4550
- name: Extract containerd-shim-spin-linux-${{ env.ARCH }}
4651
run: |
4752
mkdir -p ./bin

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ workloads:
4444
./scripts/workloads.sh
4545

4646
.PHONY: integration-tests
47-
integration-tests: install-cross check-bins move-bins up pod-status-check workloads
48-
cross test --release -- --nocapture
47+
integration-tests: check-bins move-bins up pod-status-check workloads
48+
cargo test -p containerd-shim-spin-tests -- --nocapture
4949

5050
.PHONY: tests/clean
5151
tests/clean:

scripts/check-bins.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ which_binary() {
3434

3535

3636
# List of binary names
37-
binaries=("k3d" "cross" "docker" "kubectl")
37+
binaries=("k3d" "docker" "kubectl")
3838

3939
for binary in "${binaries[@]}"; do
4040
which_binary "$binary"

scripts/workloads.sh

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
set -euo pipefail
44

5+
# Check if kubectl is installed
6+
if ! command -v kubectl &> /dev/null; then
7+
echo "kubectl is not installed. Installing..."
8+
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
9+
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl;
10+
fi
11+
512
# apply the workloads
613
echo ">>> apply workloads"
714
kubectl apply -f tests/workloads

0 commit comments

Comments
 (0)