start-server-and-test icon indicating copy to clipboard operation
start-server-and-test copied to clipboard

run more than 2 server?

Open johnico opened this issue 4 years ago • 2 comments

is it possible to run more than 2 servers? i have 3 dockers that I need to run

server-test docker run 1 {port} docker run 2 {port} docker run 3 {port} {test command} but this does not work

johnico avatar Feb 01 '21 15:02 johnico

You can use the concurrently package to run multiple commands at the same time. For the availability test you can use a | to separate multiple tests: "8080|http://foo.com"

marklagendijk avatar Apr 09 '21 08:04 marklagendijk

That works and I appreciate the workaround but it does mean one more dependence to install and keep up-to-date (assuming you're not already using concurrently). Is there any reason why this should be arbitrarily limited to 2 servers? If start-server-and-test already allows for more than one why not just make it arbitrary the amount of servers that can be run? It seems to me like the syntax already naturally lends itself to this and I can't see any conflicts this would cause (in fact I actually initially tried this assuming it would just work given that I knew it worked with 2 servers):

start-server-and-test <server1> <server1 test condition> [<server2> <server2 test condition> [...]] <test>

callumgare avatar May 13 '22 02:05 callumgare