Skip to content

Commit 8ca034c

Browse files
committed
test: setting custom application_name
1 parent 704fb13 commit 8ca034c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/server/query.ts

+21
Original file line numberDiff line numberDiff line change
@@ -730,3 +730,24 @@ test('error with internalQuery property', async () => {
730730
}
731731
`)
732732
})
733+
734+
test('custom application_name', async () => {
735+
const res = await app.inject({
736+
method: 'POST',
737+
path: '/query',
738+
headers: {
739+
'x-pg-application-name': 'test',
740+
},
741+
payload: {
742+
query: 'SHOW application_name;',
743+
},
744+
})
745+
746+
expect(res.json()).toMatchInlineSnapshot(`
747+
[
748+
{
749+
"application_name": "test",
750+
},
751+
]
752+
`)
753+
})

0 commit comments

Comments
 (0)