testing: make it so caddytest launches an instance of caddy per server

This commit is contained in:
a 2024-06-23 19:58:42 -05:00
parent c2ccf8690f
commit b732a7999a
No known key found for this signature in database
GPG key ID: 374BC539FE795AF0
24 changed files with 1071 additions and 881 deletions

View file

@ -7,21 +7,21 @@ import (
)
func TestLeafCertLoaders(t *testing.T) {
tester := caddytest.NewTester(t)
tester.InitServer(`
harness := caddytest.StartHarness(t)
harness.LoadConfig(`
{
"admin": {
"listen": "localhost:2999"
"listen": "{$TESTING_CADDY_ADMIN_BIND}"
},
"apps": {
"http": {
"http_port": 9080,
"https_port": 9443,
"http_port": {$TESTING_CADDY_PORT_ONE},
"https_port": {$TESTING_CADDY_PORT_TWO},
"grace_period": 1,
"servers": {
"srv0": {
"listen": [
":9443"
":{$TESTING_CADDY_PORT_TWO}"
],
"routes": [
{