Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 55f2a3c

Browse files
committed
Support running e2e on macOS
1 parent 4671491 commit 55f2a3c

3 files changed

Lines changed: 33 additions & 20 deletions

File tree

.github/workflows/selftest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ jobs:
88
os:
99
- ubuntu-24.04
1010
- ubuntu-24.04-arm
11+
- macos-13 # arm-based macOS runners does not support nested virt
1112
runs-on: ${{ matrix.os }}
1213
steps:
1314
- uses: actions/checkout@v4

action.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ runs:
3232
repository: jumpstarter-dev/jumpstarter
3333
ref: ${{ inputs.jumpstarter-ref }}
3434
path: jumpstarter
35+
- name: Install Docker and Kind (macOS)
36+
if: runner.os == 'macOS'
37+
shell: bash
38+
run: |
39+
brew install colima docker kind go kubectl helm gnu-sed
40+
colima start --network-address --cpu 4 --memory 8 --mount-type virtiofs
3541
- name: Deploy dex
3642
shell: bash
3743
run: |
@@ -59,12 +65,20 @@ runs:
5965
--group=system:unauthenticated
6066
6167
helm repo add dex https://charts.dexidp.io
62-
helm install --namespace dex --wait -f "$GITHUB_ACTION_PATH"/dex.values.yaml dex dex/dex
68+
helm install --namespace dex --wait --timeout 20m -f "$GITHUB_ACTION_PATH"/dex.values.yaml dex dex/dex
69+
70+
if [[ "$(uname)" == "Darwin" ]]; then
71+
echo "192.168.65.2 dex.dex.svc.cluster.local" | sudo tee -a /etc/hosts
72+
gsed -i 's|$("${SCRIPT_DIR}"/get_ext_ip.sh)|192.168.65.2|' ./controller/hack/deploy_with_helm.sh
73+
gsed -i 's|RETRIES=60|RETRIES=600|' ./controller/hack/deploy_with_helm.sh
6374
64-
sudo cp ca.pem /usr/local/share/ca-certificates/dex.crt
65-
sudo update-ca-certificates
75+
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ca.pem
76+
else
77+
echo "127.0.0.1 dex.dex.svc.cluster.local" | sudo tee -a /etc/hosts
6678
67-
echo "127.0.0.1 dex.dex.svc.cluster.local" | sudo tee -a /etc/hosts
79+
sudo cp ca.pem /usr/local/share/ca-certificates/dex.crt
80+
sudo update-ca-certificates
81+
fi
6882
- name: Deploy jumpstarter controller
6983
shell: bash
7084
run: |
@@ -90,6 +104,7 @@ runs:
90104
. .venv/bin/activate
91105
92106
export JUMPSTARTER_GRPC_INSECURE=1
107+
export JUMPSTARTER_FORCE_SYSTEM_CERTS=1
93108
94109
kubectl create -n default sa test-client-sa
95110
kubectl create -n default sa test-exporter-sa

tests.bats

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ setup() {
33
bats_load_library bats-assert
44
}
55

6+
wait_for_exporter() {
7+
kubectl -n default wait --timeout 20m --for=condition=Online --for=condition=Registered \
8+
exporters.jumpstarter.dev/test-exporter-oidc
9+
kubectl -n default wait --timeout 20m --for=condition=Online --for=condition=Registered \
10+
exporters.jumpstarter.dev/test-exporter-sa
11+
kubectl -n default wait --timeout 20m --for=condition=Online --for=condition=Registered \
12+
exporters.jumpstarter.dev/test-exporter-legacy
13+
}
14+
615
@test "can create clients with admin cli" {
716
jmp admin create client test-client-oidc --unsafe --out /dev/null \
817
--oidc-username dex:test-client-oidc
@@ -78,17 +87,11 @@ while true; do
7887
done
7988
EOF
8089

81-
kubectl -n default wait --for=condition=Online --for=condition=Registered \
82-
exporters.jumpstarter.dev/test-exporter-oidc
83-
kubectl -n default wait --for=condition=Online --for=condition=Registered \
84-
exporters.jumpstarter.dev/test-exporter-sa
85-
kubectl -n default wait --for=condition=Online --for=condition=Registered \
86-
exporters.jumpstarter.dev/test-exporter-legacy
90+
wait_for_exporter
8791
}
8892

8993
@test "can specify client config only using environment variables" {
90-
kubectl -n default wait --for=condition=Online --for=condition=Registered \
91-
exporters.jumpstarter.dev/test-exporter-oidc
94+
wait_for_exporter
9295

9396
JMP_NAMEPSACE=default \
9497
JMP_NAME=test-exporter-legacy \
@@ -98,8 +101,7 @@ EOF
98101
}
99102

100103
@test "can operate on leases" {
101-
kubectl -n default wait --for=condition=Online --for=condition=Registered \
102-
exporters.jumpstarter.dev/test-exporter-oidc
104+
wait_for_exporter
103105

104106
jmp config client use test-client-oidc
105107

@@ -110,12 +112,7 @@ EOF
110112
}
111113

112114
@test "can lease and connect to exporters" {
113-
kubectl -n default wait --for=condition=Online --for=condition=Registered \
114-
exporters.jumpstarter.dev/test-exporter-oidc
115-
kubectl -n default wait --for=condition=Online --for=condition=Registered \
116-
exporters.jumpstarter.dev/test-exporter-sa
117-
kubectl -n default wait --for=condition=Online --for=condition=Registered \
118-
exporters.jumpstarter.dev/test-exporter-legacy
115+
wait_for_exporter
119116

120117
jmp shell --client test-client-oidc --selector example.com/board=oidc j power on
121118
jmp shell --client test-client-sa --selector example.com/board=sa j power on

0 commit comments

Comments
 (0)