Skip to content

Commit fe942e3

Browse files
authored
tests(server): force db reset (#397)
1 parent 0474934 commit fe942e3

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
postgressocket:
6464
image: postgres:12
6565
volumes:
66-
- /mnt:/var/run/postgresql
66+
- /mnt/psql:/var/run/postgresql
6767
env:
6868
POSTGRES_USER: postgres
6969
POSTGRES_PASSWORD: postgres
@@ -81,13 +81,13 @@ jobs:
8181
echo "::set-env name=CHROME_PATH::$(which google-chrome-stable)"
8282
echo "::set-env name=POSTGRES_DB_URL::postgres://postgres:postgres@localhost/lighthouse_ci_test"
8383
echo "::set-env name=MYSQL_DB_URL::mysql://root:[email protected]:33306/lighthouse_ci_test"
84-
echo "::set-env name=POSTGRES_SOCKET_PATH::/mnt/.s.PGSQL.5432"
84+
echo "::set-env name=POSTGRES_SOCKET_PATH::/mnt/psql/.s.PGSQL.5432"
8585
8686
export PGPASSWORD="postgres"
8787
export MYSQL_PWD="mysql"
8888
psql -h localhost -p 5432 -c 'create database lighthouse_ci_test;' -U postgres
8989
mysql --host=127.0.0.1 --port=33306 -e 'create database lighthouse_ci_test;' -u root
90-
psql --host /mnt -c 'create database lighthouse_ci_test;' -U postgres
90+
psql --host /mnt/psql -c 'create database lighthouse_ci_test;' -U postgres
9191
9292
google-chrome-stable --version
9393
- run: yarn

packages/server/test/mysql-socket-path-server.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ describe('mysql server (socket path)', () => {
2828
storage: {
2929
storageMethod: 'sql',
3030
sqlDialect: 'mysql',
31+
sqlDangerouslyResetDatabase: true,
3132
sqlDialectOptions: {
3233
socketPath: process.env.MYSQL_SOCKET_PATH,
3334
},

packages/server/test/postgres-socket-path-server.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ describe('postgres server', () => {
2828
storage: {
2929
storageMethod: 'sql',
3030
sqlDialect: 'postgres',
31+
sqlDangerouslyResetDatabase: true,
3132
sqlDialectOptions: {
3233
socketPath: process.env.POSTGRES_SOCKET_PATH,
3334
},

0 commit comments

Comments
 (0)