Skip to content

Commit eb7173f

Browse files
committed
Adapt integration testing setup
1 parent 0f89754 commit eb7173f

12 files changed

+191
-787
lines changed

.github/workflows/test.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,11 @@ jobs:
132132
# for each integration test file
133133
for test in scrapyd_k8s/tests/integration/test_*.py; do
134134
echo; echo "# $test"
135-
# run scrapyd-k8s with test-specific configuration file
135+
# run scrapyd-k8s with test-specific configuration file, run k8s patch if available
136136
cfg=`echo "$test" | sed 's/\.py$/.conf/'`
137137
kubectl create cm scrapyd-k8s-testcfg --from-file=scrapyd_k8s.test.conf="$cfg"
138+
k8sconfig=`echo "$test" | sed 's/\.py$/\.k8s.sh/'`
139+
[ -x "$k8sconfig" ] && "$k8sconfig" up
138140
kubectl scale --replicas=1 deploy/scrapyd-k8s
139141
# wait for scrapyd-k8s to become ready
140142
kubectl wait --for=condition=Available deploy/scrapyd-k8s --timeout=60s
@@ -151,6 +153,7 @@ jobs:
151153
kubectl scale --replicas=0 deploy/scrapyd-k8s
152154
kubectl wait --for=delete pod -l app.kubernetes.io/name=scrapyd-k8s --timeout=90s
153155
kubectl delete cm scrapyd-k8s-testcfg --wait
156+
[ -x "$k8sconfig" ] && "$k8sconfig" down
154157
done
155158
156159
test-k8s:

kubernetes-0.yaml

-191
This file was deleted.

0 commit comments

Comments
 (0)