Skip to content

Commit

Permalink
Update all testing DBs, remove EOL versions (#379)
Browse files Browse the repository at this point in the history
* Update all testing DBs, remove EOL versions

Signed-off-by: Derek Nola <[email protected]>

* Fix connection check for newer mariadb versions

Signed-off-by: Derek Nola <[email protected]>

---------

Signed-off-by: Derek Nola <[email protected]>
  • Loading branch information
dereknola authored Dec 13, 2024
1 parent 277dca0 commit dbf4c50
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV SRC_DIR=/go/src/github.com/k3s-io/kine
WORKDIR ${SRC_DIR}/

# Validate needs everything in the project, so we separate it out for better caching
FROM infra as validate
FROM infra AS validate
ARG SKIP_VALIDATE
ENV SKIP_VALIDATE=${SKIP_VALIDATE}
COPY . .
Expand All @@ -41,6 +41,6 @@ RUN --mount=type=cache,id=gomod,target=/go/pkg/mod \
--mount=type=cache,id=gobuild,target=/root/.cache/go-build \
./scripts/build

FROM scratch as binary
FROM scratch AS binary
ENV SRC_DIR=/go/src/github.com/k3s-io/kine
COPY --from=build ${SRC_DIR}/bin /bin
5 changes: 2 additions & 3 deletions scripts/test-run-cockroachdb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ start-test() {
export -f start-test

VERSION_LIST="\
cockroachdb v20.2
cockroachdb v20.1
cockroachdb v19.2"
cockroachdb v24.3
cockroachdb v24.1"

while read ENGINE VERSION; do
LABEL=$ENGINE-$VERSION DB_PASSWORD_ENV=POSTGRES_PASSWORD DB_IMAGE=docker.io/$ENGINE/cockroach:latest-$VERSION DB_ARGS="start-single-node --insecure" run-test
Expand Down
14 changes: 10 additions & 4 deletions scripts/test-run-mysql
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ start-test() {
local port=$(cat $TEST_DIR/databases/*/metadata/port)
local pass=$(cat $TEST_DIR/databases/*/metadata/password)
local image=$(cat $TEST_DIR/databases/*/metadata/image)
# Starting with mariadb 11, you have to call to mariadb instead of mysql
if [[ $image == *mariadb* ]]; then
db_type="mariadb"
else
db_type="mysql"
fi
DB_CONNECTION_TEST="
docker run --rm
--name connection-test
$image
mysql
$db_type
--host=$ip
--port=$port
--user=root
Expand All @@ -23,11 +29,11 @@ start-test() {
export -f start-test

VERSION_LIST="\
mysql 8.4
mysql 8.0
mysql 5.7
mariadb 11.4
mariadb 10.11
mariadb 10.5
mariadb 10.4"
mariadb 10.6"

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
2 changes: 1 addition & 1 deletion scripts/test-run-nats
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export -f start-test
# test minimum supported version and most recent version of NATS
VERSION_LIST="\
nats 2.9.25
nats 2.10.12"
nats 2.10.23"

while read ENGINE VERSION; do
LABEL=$ENGINE-$VERSION DB_PASSWORD_ENV=NATS_JS_PASSWORD DB_ARGS="-js" DB_IMAGE=docker.io/library/$ENGINE:$VERSION run-test
Expand Down
8 changes: 4 additions & 4 deletions scripts/test-run-postgres
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ start-test() {
export -f start-test

VERSION_LIST="\
postgres 15.4
postgres 14.9
postgres 13.12
postgres 12.16"
postgres 17
postgres 16
postgres 15
postgres 14"

while read ENGINE VERSION; do
LABEL=$ENGINE-$VERSION DB_PASSWORD_ENV=POSTGRES_PASSWORD DB_IMAGE=docker.io/library/$ENGINE:$VERSION run-test
Expand Down

0 comments on commit dbf4c50

Please sign in to comment.