(t *testing.T)
| 221 | } |
| 222 | |
| 223 | func TestModuleWorkerInheritsEnv(t *testing.T) { |
| 224 | tester := caddytest.NewTester(t) |
| 225 | initServer(t, tester, ` |
| 226 | { |
| 227 | skip_install_trust |
| 228 | admin localhost:2999 |
| 229 | } |
| 230 | |
| 231 | http://localhost:`+testPort+` { |
| 232 | route { |
| 233 | php { |
| 234 | root ../testdata |
| 235 | env APP_ENV inherit_this |
| 236 | worker worker-with-env.php |
| 237 | } |
| 238 | } |
| 239 | } |
| 240 | `, "caddyfile") |
| 241 | |
| 242 | tester.AssertGetResponse("http://localhost:"+testPort+"/worker-with-env.php", http.StatusOK, "Worker has APP_ENV=inherit_this") |
| 243 | } |
| 244 | |
| 245 | func TestNamedModuleWorkers(t *testing.T) { |
| 246 | var wg sync.WaitGroup |
nothing calls this directly
no test coverage detected