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.jsonfiles? Right now, with just oneTestServer, it's using theappsettings.jsonof the test project. How do you configure aTestServerto use a different config file? - Once I have two
TestServersup and running, do they function as completely independent entities? Most particularly, if I have anystaticvalues, will their values be shared between the two environments, or can they function independently, as they would in real life?