Replies: 1 comment
-
Are you trying to write a test that connects to your production server? I really would not recommend doing that since you want your tests to be deterministic. If you really still want yo you'll have to construct requests manually with reqwest. I don't think adding code to axum to make that easier is necessary since axum is a server library and not a client. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are two environments in our company,
test
andprod
.test
: We can connect database from our own computer.prod
: We can't connect database from our own computer.I can write a unit test to test whether handler works in
test
environment, but it's not convenient to write a test inprod
environment. Is it possible to provide some helpers to convertJson<T>
toreqwest::Request
? It can helps developers test more conveniently.Handler:
Test:
Beta Was this translation helpful? Give feedback.
All reactions