Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tests): get integration tests passing #35

Merged
Merged
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
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
Loading