Skip to content

Commit

Permalink
e2e: Move tests to gh action using azure workers
Browse files Browse the repository at this point in the history
use the azure runners provided by "confidential-containers/infra" to run
the kata-clh and kata-qemu workflows.

Signed-off-by: Lukáš Doktor <[email protected]>
  • Loading branch information
ldoktor committed Nov 30, 2023
1 parent a27d7f3 commit fd00a61
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/az-e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: azure e2e tests
on:
pull_request:
branches:
- main

permissions:
contents: read

jobs:
e2e:
name: operator azure e2e tests
runs-on: az-ubuntu-2204

strategy:
matrix:
runtimeclass: ["kata-qemu", "kata-clh"]

steps:
- uses: actions/checkout@v3

- name: Install deps
run: |
sudo apt-get update -y
sudo apt-get install -y ansible python-is-python3
- name: Run e2e tests
continue-on-error: false
run: |
cd tests/e2e
export PATH="$PATH:/usr/local/bin"
./run-local.sh -r "$RUNTIME_CLASS" -u
env:
RUNTIME_CLASS: ${{ matrix.runtimeclass }}
4 changes: 2 additions & 2 deletions tests/e2e/cluster/up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ main() {

# Untaint the node so that pods can be scheduled on it.
for role in master control-plane; do
kubectl taint nodes "$(hostname)" \
kubectl taint nodes "$(hostname | tr '[:upper:]' '[:lower:]')" \
"node-role.kubernetes.io/$role:NoSchedule-"
done

kubectl label node "$(hostname)" node.kubernetes.io/worker=
kubectl label node "$(hostname | tr '[:upper:]' '[:lower:]')" node.kubernetes.io/worker=
}

main "$@"
4 changes: 2 additions & 2 deletions tests/e2e/operator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ install_operator() {

# The node should be 'worker' labeled
local label="node.kubernetes.io/worker"
if ! kubectl get node "$(hostname)" -o jsonpath='{.metadata.labels}' \
if ! kubectl get node "$(hostname | tr '[:upper:]' '[:lower:]')" -o jsonpath='{.metadata.labels}' \
| grep -q "$label"; then
kubectl label node "$(hostname)" "$label="
kubectl label node "$(hostname | tr '[:upper:]' '[:lower:]')" "$label="
fi

handle_older_containerd
Expand Down

0 comments on commit fd00a61

Please sign in to comment.