Skip to content

Commit

Permalink
Remove dapper from testing, update DBs tested (#232)
Browse files Browse the repository at this point in the history
* Remove dapper from testing
* Bump default k3s used for testing
* Update mysql and postgres versions to test

Signed-off-by: Derek Nola <[email protected]>
  • Loading branch information
dereknola authored Oct 30, 2023
1 parent 8c55159 commit 6d65d05
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 33 deletions.
9 changes: 7 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ steps:
path: /var/run/docker.sock

- name: test
image: rancher/dapper:v0.5.0
image: rancher/dapper:v0.6.0
commands:
- dapper -f Dockerfile.test.dapper
- docker build -t kine:test-${DRONE_COMMIT} -f Dockerfile.test .
- >
docker run -i -e ARCH -e REPO -e TAG -e DRONE_TAG -e IMAGE_NAME
-v /var/run/docker.sock:/var/run/docker.sock -v kine-cache:/go/src/github.com/k3s-io/kine/.cache
--privileged kine:test-${DRONE_COMMIT}
environment:
ARCH: "${DRONE_STAGE_ARCH}"
DOCKER_BUILDKIT: "1"
volumes:
- name: docker
path: /var/run/docker.sock
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ Session.vim
# cscope-related files
cscope.*

# Go test binaries
*.test

# JUnit test output from ginkgo e2e tests
/junit*.xml

Expand Down
16 changes: 16 additions & 0 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM golang:1.21-alpine3.17

ARG ARCH=amd64

RUN apk -U add bash ca-certificates coreutils curl docker-cli file findutils gcc git less musl-dev vim wget
RUN apk -U add py3-pip && pip install kubernetes termplotlib==v0.3.4

ENV KINE_SOURCE /go/src/github.com/k3s-io/kine/
ENV HOME ${KINE_SOURCE}
WORKDIR ${KINE_SOURCE}


COPY . ${KINE_SOURCE}

ENTRYPOINT ["./scripts/entry"]
CMD ["test"]
16 changes: 0 additions & 16 deletions Dockerfile.test.dapper

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/test-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ provision-server() {
-p 6443:6443 \
-e K3S_DEBUG=true \
-e K3S_DATASTORE_ENDPOINT=$K3S_DATASTORE_ENDPOINT \
${K3S_IMAGE:-docker.io/rancher/k3s:v1.25.2-k3s1} server \
${K3S_IMAGE:-docker.io/rancher/k3s:v1.26.9-k3s1} server \
--disable=coredns,servicelb,traefik,local-storage,metrics-server \
--disable-agent --disable-scheduler --disable-cloud-controller --disable-kube-proxy --disable-network-policy

Expand Down
6 changes: 2 additions & 4 deletions scripts/test-run-mysql
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ export -f start-test
VERSION_LIST="\
mysql 8.0
mysql 5.7
mysql 5.6
mariadb 10.11
mariadb 10.5
mariadb 10.4
mariadb 10.3
mariadb 10.2"
mariadb 10.4"

while read ENGINE VERSION; do
LABEL=$ENGINE-$VERSION DB_PASSWORD_ENV=MYSQL_ROOT_PASSWORD DB_IMAGE=docker.io/library/$ENGINE:$VERSION run-test
Expand Down
13 changes: 6 additions & 7 deletions scripts/test-run-postgres
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ start-test() {
export -f start-test

VERSION_LIST="\
postgres 13.2
postgres 12.6
postgres 11.11
postgres 10.16
postgres 9.6
postgres 9.5"
postgres 15.4
postgres 14.9
postgres 13.12
postgres 12.16
postgres 11.21-alpine" # A generic 11.21 image is not available

while read ENGINE VERSION; do
LABEL=$ENGINE-$VERSION DB_PASSWORD_ENV=POSTGRES_PASSWORD DB_IMAGE=docker.io/library/$ENGINE:$VERSION run-test
echo "LABEL=$ENGINE-$VERSION DB_PASSWORD_ENV=POSTGRES_PASSWORD DB_IMAGE=docker.io/library/$ENGINE:$VERSION run-test"
done <<< $VERSION_LIST

0 comments on commit 6d65d05

Please sign in to comment.