From f0c0f38ba57ec7f01839a811d29cb9c5187ad726 Mon Sep 17 00:00:00 2001
From: Sven Dowideit <SvenDowideit@home.org.au>
Date: Thu, 14 Jan 2021 11:30:49 +1000
Subject: [PATCH] tests: use actual admin port value in error message (#3973)

Signed-off-by: Sven Dowideit <sven.dowideit@csiro.au>
---
 caddytest/caddytest.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/caddytest/caddytest.go b/caddytest/caddytest.go
index 4076bd5aa..c4c268768 100644
--- a/caddytest/caddytest.go
+++ b/caddytest/caddytest.go
@@ -223,7 +223,7 @@ func isCaddyAdminRunning() error {
 	}
 	resp, err := client.Get(fmt.Sprintf("http://localhost:%d/config/", Default.AdminPort))
 	if err != nil {
-		return errors.New("caddy integration test caddy server not running. Expected to be listening on localhost:2019")
+		return fmt.Errorf("caddy integration test caddy server not running. Expected to be listening on localhost:%d", Default.AdminPort)
 	}
 	resp.Body.Close()