I am writing a process that brokers data transfer between two identical APIs (FWIW, one is a local API running in a different container, and the other is in the cloud).
I want to write some test code to ensure that the data transfer code does what it should. Up till now, I've been using TestServer
for API tests, but now things might get a little complicated when I want to run two servers. A couple of questions arise:
- How do I get them to use different
appsettings.json
files? Right now, with just oneTestServer
, it's using theappsettings.json
of the test project. How do you configure aTestServer
to use a different config file? - Once I have two
TestServers
up and running, do they function as completely independent entities? Most particularly, if I have anystatic
values, will their values be shared between the two environments, or can they function independently, as they would in real life?