-
-
Notifications
You must be signed in to change notification settings - Fork 34
Update fastify to v3 #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 10 commits
2482195
2a3ba7e
eb743d3
1ba3972
77647cb
364bbeb
a51eb1f
88a9c9a
a013de1
90dea4d
718eb06
672d19a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
version: 1 | ||
update_configs: | ||
- package_manager: "javascript" | ||
directory: "/" | ||
update_schedule: "daily" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
localhost:*:*:postgres:postgres | ||
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ test('Should be able to use native module', (t) => { | |
t.teardown(() => fastify.close()) | ||
|
||
fastify.register(fastifyPostgres, { | ||
connectionString: 'postgres://postgres@localhost/postgres', | ||
connectionString: 'postgres://postgres:postgres@localhost/postgres', | ||
native: true | ||
}) | ||
|
||
|
@@ -38,7 +38,7 @@ test('Should be able to use an alternative pg module', (t) => { | |
t.teardown(() => fastify.close()) | ||
|
||
fastify.register(fastifyPostgres, { | ||
connectionString: 'postgres://postgres@localhost/postgres', | ||
connectionString: 'postgres://postgres:postgres@localhost/postgres', | ||
pg: altPg | ||
}) | ||
|
||
|
@@ -64,20 +64,20 @@ test('Should not throw if registered within different scopes (with and without n | |
|
||
fastify.register(function scopeOne (instance, opts, next) { | ||
instance.register(fastifyPostgres, { | ||
connectionString: 'postgres://postgres@localhost/postgres' | ||
connectionString: 'postgres://postgres:postgres@localhost/postgres' | ||
}) | ||
|
||
next() | ||
}) | ||
|
||
fastify.register(function scopeTwo (instance, opts, next) { | ||
instance.register(fastifyPostgres, { | ||
connectionString: 'postgres://postgres@localhost/postgres', | ||
connectionString: 'postgres://postgres:postgres@localhost/postgres', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe we can use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is the same locally as well. I updated to docker commands |
||
name: 'one' | ||
}) | ||
|
||
instance.register(fastifyPostgres, { | ||
connectionString: 'postgres://postgres@localhost/postgres', | ||
connectionString: 'postgres://postgres:postgres@localhost/postgres', | ||
name: 'two' | ||
}) | ||
|
||
|
@@ -97,11 +97,11 @@ test('Should throw when trying to register multiple instances without giving a n | |
t.teardown(() => fastify.close()) | ||
|
||
fastify.register(fastifyPostgres, { | ||
connectionString: 'postgres://postgres@localhost/postgres' | ||
connectionString: 'postgres://postgres:postgres@localhost/postgres' | ||
}) | ||
|
||
fastify.register(fastifyPostgres, { | ||
connectionString: 'postgres://postgres@localhost/postgres' | ||
connectionString: 'postgres://postgres:postgres@localhost/postgres' | ||
}) | ||
|
||
fastify.ready((err) => { | ||
|
@@ -119,13 +119,13 @@ test('Should throw when trying to register duplicate connection names', (t) => { | |
|
||
fastify | ||
.register(fastifyPostgres, { | ||
connectionString: 'postgres://postgres@localhost/postgres', | ||
name | ||
}) | ||
.register(fastifyPostgres, { | ||
connectionString: 'postgres://postgres@localhost/postgres', | ||
connectionString: 'postgres://postgres:postgres@localhost/postgres', | ||
name | ||
}) | ||
fastify.register(fastifyPostgres, { | ||
connectionString: 'postgres://postgres:postgres@localhost/postgres', | ||
name | ||
}) | ||
|
||
fastify.ready((err) => { | ||
t.ok(err) | ||
|
@@ -140,7 +140,7 @@ test('fastify.pg namespace should exist', (t) => { | |
t.teardown(() => fastify.close()) | ||
|
||
fastify.register(fastifyPostgres, { | ||
connectionString: 'postgres://postgres@localhost/postgres' | ||
connectionString: 'postgres://postgres:postgres@localhost/postgres' | ||
}) | ||
|
||
fastify.ready((err) => { | ||
|
@@ -160,7 +160,7 @@ test('fastify.pg.test namespace should exist', (t) => { | |
t.teardown(() => fastify.close()) | ||
|
||
fastify.register(fastifyPostgres, { | ||
connectionString: 'postgres://postgres@localhost/postgres', | ||
connectionString: 'postgres://postgres:postgres@localhost/postgres', | ||
name: 'test' | ||
}) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the ci config we must set a POSTGRESS_PASSWORD value, and when we run the psql command it would prompt for a password, but if we provide a
.pgpass
file it will use that to get the password