relaycorp / awala-endpoint-internet

Middleware for server-side apps to communicate over Awala without implementing any of the networking or cryptography from the protocol suite.
https://docs.relaycorp.tech/awala-endpoint-internet/
GNU Affero General Public License v3.0
1 stars 0 forks source link

db -connection test #48

Closed levansuper closed 1 year ago

levansuper commented 1 year ago

This PR is a showcase of the error that we talked about I was able to locate a strange behavior. I tried to use ConfigItem model and it did not have a problem of the connection. Then I created ConfigItem2 model and tried to use it in the route and it still had the same problem as PeerEndpoint Then I tried to find all the places where ConfigItem was used and tried to use ConfigItem2 the same way. So in the end I found our that if we add a model into config.ts than the model starts to work.

Now if we tun the test file /test - Request1 and /test - Request2 tests will run but only the first will be successful. If we remove all the commented code in config.ts that it works.