Skip to content

Commit c208cd6

Browse files
committed
add drizzle ORM test as part of client test
1 parent 967cc08 commit c208cd6

11 files changed

Lines changed: 30 additions & 200 deletions

File tree

.github/workflows/ci-orm-tests.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

testing/DoltgresORMDockerfile

Lines changed: 0 additions & 60 deletions
This file was deleted.

testing/PostgresDockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=linux/amd64 ubuntu:22.04
1+
FROM --platform=${BUILDPLATFORM} ubuntu:22.04
22

33
# install python, java, bats, git ruby, perl, cpan
44
ENV DEBIAN_FRONTEND=noninteractive
@@ -7,7 +7,7 @@ RUN apt update -y && \
77
curl \
88
gnupg \
99
software-properties-common && \
10-
curl -sL https://deb.nodesource.com/setup_20.x | bash - && \
10+
curl -sL https://deb.nodesource.com/setup_22.x | bash - && \
1111
add-apt-repository ppa:deadsnakes/ppa -y && \
1212
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \
1313
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
@@ -44,8 +44,8 @@ RUN apt update -y && \
4444

4545
# install go
4646
WORKDIR /root
47-
ENV GO_VERSION=1.23.3
48-
ENV GOPATH=$HOME/go
47+
ENV GO_VERSION=1.25.0
48+
ENV GOPATH=/go
4949
ENV PATH=$PATH:$GOPATH/bin
5050
ENV PATH=$PATH:$GOPATH/bin:/usr/local/go/bin
5151
RUN curl -O "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" && \
@@ -56,7 +56,7 @@ RUN curl -O "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" && \
5656
go version
5757

5858
# Setup JAVA_HOME -- useful for docker commandline
59-
ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64/
59+
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/
6060

6161
# install java postgres JDBC driver
6262
RUN mkdir -p /postgres-client-tests/java

testing/doltgres-orm-tests/README.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

testing/doltgres-orm-tests/doltgres-orm-tests-entrypoint.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

testing/doltgres-orm-tests/doltgres-orm-tests.bats

Lines changed: 0 additions & 36 deletions
This file was deleted.

testing/doltgres-orm-tests/helpers.bash

Lines changed: 0 additions & 50 deletions
This file was deleted.

testing/doltgres-orm-tests/drizzle/drizzle.config.ts renamed to testing/postgres-client-tests/drizzle/drizzle.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default defineConfig({
55
schema: './src/db/schema.ts',
66
dialect: 'postgresql',
77
dbCredentials: {
8-
url: 'postgres://postgres:password@localhost:5432/postgres',
8+
url: process.env.DATABASE_URL!,
99
},
1010
tablesFilter: ["!dolt_*"], // IMPORTANT to filter out dolt system tables
1111
});
File renamed without changes.

testing/doltgres-orm-tests/drizzle/src/index.ts renamed to testing/postgres-client-tests/drizzle/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import { drizzle } from 'drizzle-orm/node-postgres';
44
import { usersTable } from "./db/schema";
55
import { eq } from 'drizzle-orm';
66

7-
const connectionString = 'postgres://postgres:password@localhost:5432/postgres';
7+
const connectionString = process.env.DATABASE_URL!
88
const pool = new Pool({ connectionString });
9+
910
const db = drizzle(pool);
1011

1112
async function main() {

0 commit comments

Comments
 (0)