When I curl request to my app that's running outside of test environment, the CLS module seems to work. When I run in my integration test, it does not seem to work.
The biggest issue I have is that the test endpoint I'm using will and should result in the user context name and uuid being written to columns in the database createdBy and createdByName - which works from a normal curl call, but when I run from the test, the values are missing. Can you see any problem with the code? Pulling my hair out as to why it wouldn't be working in this test context...
Observed behavior
When I curl request to my app that's running outside of test environment, the CLS module seems to work. When I run in my integration test, it does not seem to work.
The biggest issue I have is that the test endpoint I'm using will and should result in the user context
name
anduuid
being written to columns in the databasecreatedBy
andcreatedByName
- which works from a normal curl call, but when I run from the test, the values are missing. Can you see any problem with the code? Pulling my hair out as to why it wouldn't be working in this test context...curl -X POST -H 'x-api-key: time-off-api-key' -H 'Authorization: Bearer ...' http://localhost:3391/v1/test/balance-entry
result from test:
Expected behaviour
It operates the same in tests as well as running the full
additional code