Skip to content

Commit

Permalink
fixed e2e test configuration: why does it run for only sqlite...
Browse files Browse the repository at this point in the history
  • Loading branch information
sio4 committed Sep 9, 2022
1 parent 68a6d4c commit 478cd23
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
ports:
- 3307:3306
# needed because the mysql container does not provide a healthcheck
options: --health-cmd "mysqladmin ping -h localhost" --health-interval 10s --health-timeout 5s --health-retries 5
options: --health-cmd "mysqladmin ping -h localhost" --health-interval 5s --health-timeout 5s --health-retries 10

steps:
- uses: actions/checkout@v3
Expand All @@ -51,9 +51,9 @@ jobs:
run: |
go test -v -tags sqlite -race ./...
- name: Reset soda and run e2e
- name: Reset database and run e2e
env:
SODA_DIALECT: "sqlite"
SODA_DIALECT: "mysql"
run: |
soda drop -e $SODA_DIALECT -p ./testdata/migrations
soda create -e $SODA_DIALECT -p ./testdata/migrations
Expand All @@ -77,9 +77,9 @@ jobs:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
- 5433:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
options: --health-cmd pg_isready --health-interval 5s --health-timeout 5s --health-retries 10

steps:
- uses: actions/checkout@v3
Expand All @@ -105,9 +105,9 @@ jobs:
run: |
go test -v -tags sqlite -race ./...
- name: Reset soda and run e2e
- name: Reset database and run e2e
env:
SODA_DIALECT: "sqlite"
SODA_DIALECT: "postgres"
run: |
soda drop -e $SODA_DIALECT -p ./testdata/migrations
soda create -e $SODA_DIALECT -p ./testdata/migrations
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
pushd crdb
wget -qO- https://binaries.cockroachdb.com/cockroach-v21.1.19.linux-amd64.tgz | tar -xz
mv cockroach-v21.1.19.linux-amd64/* .
./cockroach start-single-node --insecure --background
./cockroach start-single-node --insecure --background --sql-addr :26258
popd
- name: Install and run soda
Expand All @@ -154,9 +154,9 @@ jobs:
run: |
go test -v -tags sqlite -race ./...
- name: Reset soda and run e2e
- name: Reset database and run e2e
env:
SODA_DIALECT: "sqlite"
SODA_DIALECT: "cockroach"
run: |
soda drop -e $SODA_DIALECT -p ./testdata/migrations
soda create -e $SODA_DIALECT -p ./testdata/migrations
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
go test -v -tags sqlite ./...
shell: bash

- name: Reset soda and run e2e
- name: Reset database and run e2e
if: ${{ matrix.os != 'windows-latest' }}
env:
SODA_DIALECT: "sqlite"
Expand All @@ -224,7 +224,7 @@ jobs:
go test -v -tags sqlite,e2e -race ./...
shell: bash

- name: Reset soda and run e2e without race detection
- name: Reset database and run e2e without race detection
if: ${{ matrix.os == 'windows-latest' }}
env:
SODA_DIALECT: "sqlite"
Expand Down
10 changes: 5 additions & 5 deletions database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ mysql:
dialect: "mysql"
database: "pop_test"
host: {{ envOr "MYSQL_HOST" "127.0.0.1" }}
port: {{ envOr "MYSQL_PORT" "3306" }}
port: {{ envOr "MYSQL_PORT" "3307" }}
user: {{ envOr "MYSQL_USER" "root" }}
password: {{ envOr "MYSQL_PASSWORD" "root" }}

postgres:
url: "postgres://postgres:postgres@localhost:5432/pop_test?sslmode=disable"
url: "postgres://postgres:postgres@localhost:5433/pop_test?sslmode=disable"
pool: 25

cockroach:
# url: "cockroach://[email protected]:26257/pop_test?application_name=cockroach&sslmode=disable"
# url: "cockroach://[email protected]:26258/pop_test?application_name=cockroach&sslmode=disable"
dialect: "cockroach"
database: "pop_test"
host: {{ envOr "COCKROACH_HOST" "127.0.0.1" }}
port: {{ envOr "COCKROACH_PORT" "26257" }}
port: {{ envOr "COCKROACH_PORT" "26258" }}
user: {{ envOr "COCKROACH_USER" "root" }}
password: {{ envOr "COCKROACH_PASSWORD" "" }}
options:
Expand All @@ -31,7 +31,7 @@ sqlserver:

sqlite:
dialect: "sqlite3"
database: "./sql_scripts/sqlite/test.sqlite"
database: "./tmp/test.sqlite"
options:
mode: rwc

0 comments on commit 478cd23

Please sign in to comment.