Skip to content

Commit 7124b09

Browse files
committed
[CI] Add docker-containerd-linux-x86-64 integration test in Prow
1 parent bac7021 commit 7124b09

File tree

4 files changed

+54
-3
lines changed

4 files changed

+54
-3
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
3+
# Copyright 2025 The Kubernetes Authors All rights reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -e
18+
set -x
19+
20+
OS="linux"
21+
ARCH="amd64"
22+
DRIVER="docker"
23+
CONTAINER_RUNTIME="containerd"
24+
EXTRA_START_ARGS=""
25+
EXTRA_TEST_ARGS=""
26+
JOB_NAME="Docker_Containerd_Linux"
27+
28+
git config --global --add safe.directory '*'
29+
COMMIT=$(git rev-parse HEAD)
30+
MINIKUBE_LOCATION=$COMMIT
31+
32+
33+
# when docker is the driver, we run integration tests directly in prow cluster
34+
# by default, prow jobs run in root, so we must switch to a non-root user to run docker driver
35+
36+
37+
source ./hack/prow/common.sh

hack/prow/prow.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ integration-prow-docker-docker-linux-x86-64:
77
./hack/prow/minikube_cross_build.sh $(GO_VERSION) linux amd64
88
./hack/prow/util/integration_prow_wrapper.sh ./hack/prow/integration_docker_docker_linux_x86-64.sh
99

10+
integration-prow-docker-containerd-linux-x86-64:
11+
# build first
12+
# container-runtime=containerd driver=docker on linux/amd64
13+
./hack/prow/minikube_cross_build.sh $(GO_VERSION) linux amd64
14+
./hack/prow/util/integration_prow_wrapper.sh ./hack/prow/integration_docker_containerd_linux_x86-64.sh
15+
1016
integration-prow-kvm-docker-linux-x86-64:
1117
# build first
1218
# container-runtime=docker driver=kvm on linux/amd64

hack/prow/util/integration_prow_wrapper.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ echo "test finished with exit code $result"
2424

2525
items=("testout.txt" "test.json" "junit-unit.xml" "test.html" "test_summary.json")
2626
for item in "${items[@]}"; do
27-
echo "Collecting ${item} to ${ARTIFACTS}/${item}"
28-
cp "${item}" "${ARTIFACTS}/${item}"
27+
if [ -f "${item}" ]; then
28+
echo "Collecting ${item} to ${ARTIFACTS}/${item}"
29+
cp "${item}" "${ARTIFACTS}/${item}"
30+
else
31+
echo "Warning: ${item} not found, skipping"
32+
fi
2933
done
3034
exit $result

test/integration/start_stop_delete_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,13 @@ func testPodScheduling(ctx context.Context, t *testing.T, profile string) {
339339
}
340340

341341
// Arbitrary value set by some container runtimes. If higher, apps like MySQL may make bad decisions.
342+
// Docker runtime sets this to 1048576, containerd sets it to 1024
342343
expected := int64(1048576)
344+
if ContainerRuntime() == "containerd" {
345+
expected = int64(1024)
346+
}
343347
if got != expected {
344-
t.Errorf("'ulimit -n' returned %d, expected %d", got, expected)
348+
t.Errorf("'ulimit -n' returned %d, expected %d for %s runtime", got, expected, ContainerRuntime())
345349
}
346350
}
347351

0 commit comments

Comments
 (0)