Skip to content

Commit

Permalink
Replace etcd and sqlite conformance tests with golang versions
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Nola <[email protected]>
  • Loading branch information
dereknola committed Feb 5, 2025
1 parent 9f6ef74 commit 48df4aa
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,9 @@ fi
# ---

if [ "$DRONE_BUILD_EVENT" = 'cron' ]; then
E2E_OUTPUT=$artifacts test-run-sonobuoy serial
echo "Did test-run-sonobuoy serial $?"
test-run-sonobuoy etcd serial
go test ./test/docker/conformance/conformance_test.go -k3sImage="$K3S_IMAGE" -serial
run-go-test ./test/docker/conformance/conformance_test.go -k3sImage="$K3S_IMAGE" -db sqlite -serial -ginkgo.v
echo "Did go conformance sqlite serial $?"
run-go-test ./test/docker/conformance/conformance_test.go -k3sImage="$K3S_IMAGE" -db etcd -serial -ginkgo.v
echo "Did go conformance etcd serial $?"
test-run-sonobuoy mysql serial
echo "Did test-run-sonobuoy-mysqk serial $?"
Expand All @@ -92,9 +91,10 @@ if [ "$DRONE_BUILD_EVENT" = 'cron' ]; then

E2E_OUTPUT=$artifacts test-run-sonobuoy parallel
echo "Did test-run-sonobuoy parallel $?"
go test ./test/docker/conformance/conformance_test.go -k3sImage="$K3S_IMAGE"
echo "Did go conformance etcd parallel $?"
echo "Did test-run-sonobuoy-etcd parallel $?"
run-go-test ./test/docker/conformance/conformance_test.go -k3sImage="$K3S_IMAGE" -db sqlite -ginkgo.v
echo "Did go conformance sqlite parallel $?"
run-go-test ./test/docker/conformance/conformance_test.go -k3sImage="$K3S_IMAGE" -db etcd -ginkgo.v
echo "Did go test conformance etcd parallel $?"
test-run-sonobuoy mysql parallel
echo "Did test-run-sonobuoy-mysql parallel $?"
test-run-sonobuoy postgres parallel
Expand Down
14 changes: 14 additions & 0 deletions tests/docker/test-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,20 @@ run-test() {
}
export -f run-test

run-go-test() {
local delay=15
(
set +x
while [ $(count-running-tests) -ge ${MAX_CONCURRENT_TESTS:-3} ]; do
sleep $delay
done
)

go test -timeout=45m -v "$@" &
pids+=($!)
}
export -f run-go-test

# ---

cleanup-test-env(){
Expand Down

0 comments on commit 48df4aa

Please sign in to comment.