Skip to content

Commit ced877d

Browse files
committed
http://localhost...
1 parent 89464df commit ced877d

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

caddy/caddy_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ func TestWorker(t *testing.T) {
9292
{
9393
skip_install_trust
9494
admin localhost:2999
95-
http_port `+testPort+`
9695
https_port 9443
9796
9897
frankenphp {
@@ -139,7 +138,7 @@ func TestGlobalAndLocalWorker(t *testing.T) {
139138
}
140139
}
141140
142-
localhost:`+testPort+` {
141+
http://localhost:`+testPort+` {
143142
route {
144143
php {
145144
root ../testdata
@@ -152,7 +151,7 @@ func TestGlobalAndLocalWorker(t *testing.T) {
152151
}
153152
}
154153
155-
localhost:`+testPortTwo+` {
154+
http://localhost:`+testPortTwo+` {
156155
route {
157156
php {
158157
root ../testdata
@@ -165,8 +164,8 @@ func TestGlobalAndLocalWorker(t *testing.T) {
165164
wg.Add(1)
166165

167166
go func(i int) {
168-
tester.AssertGetResponse("http://localhost:"+testPort+"/worker-with-env.php", http.StatusOK, fmt.Sprintf(fmt.Sprintf("Request %d has APP_ENV=%s", i, "local")))
169-
tester.AssertGetResponse("http://localhost:"+testPortTwo+"/worker-with-env.php", http.StatusOK, fmt.Sprintf(fmt.Sprintf("Request %d has APP_ENV=%s", i, "global")))
167+
tester.AssertGetResponse("http://localhost:"+testPort+"/worker-with-env.php", http.StatusOK, fmt.Sprintf(fmt.Sprintf("Worker has APP_ENV=%s", "local")))
168+
tester.AssertGetResponse("http://localhost:"+testPortTwo+"/worker-with-env.php", http.StatusOK, fmt.Sprintf(fmt.Sprintf("Worker has APP_ENV=%s", "global")))
170169
wg.Done()
171170
}(i)
172171
}

testdata/worker-with-env.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
$env = $_SERVER['APP_ENV'];
55
do {
66
$ok = frankenphp_handle_request(function () use ($i, $env): void {
7-
echo "Request $i has APP_ENV=$env";
7+
echo "Worker has APP_ENV=$env";
88
});
99

1010
$i++;

0 commit comments

Comments
 (0)