Skip to content

Commit

Permalink
Merge pull request #35 from kate-goldenring/fix-integration-tests
Browse files Browse the repository at this point in the history
fix(tests): get integration tests passing
  • Loading branch information
kate-goldenring authored Mar 13, 2024
2 parents a42715e + 24644b6 commit c0af18c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: azure/setup-kubectl@v3
- name: "Install dependencies"
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler libseccomp-dev
- name: Extract containerd-shim-spin-linux-${{ env.ARCH }}
run: |
mkdir -p ./bin
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ workloads:
./scripts/workloads.sh

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

.PHONY: tests/clean
tests/clean:
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-bins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ which_binary() {


# List of binary names
binaries=("k3d" "cross" "docker" "kubectl")
binaries=("k3d" "docker" "kubectl")

for binary in "${binaries[@]}"; do
which_binary "$binary"
Expand Down
7 changes: 7 additions & 0 deletions scripts/workloads.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

set -euo pipefail

# Check if kubectl is installed
if ! command -v kubectl &> /dev/null; then
echo "kubectl is not installed. Installing..."
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl;
fi

# apply the workloads
echo ">>> apply workloads"
kubectl apply -f tests/workloads
Expand Down

0 comments on commit c0af18c

Please sign in to comment.