diff options
Diffstat (limited to 'service/http/config_test.go')
-rw-r--r-- | service/http/config_test.go | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/service/http/config_test.go b/service/http/config_test.go index d47934ea..cb804f4a 100644 --- a/service/http/config_test.go +++ b/service/http/config_test.go @@ -64,7 +64,6 @@ func Test_Config_NoWorkers(t *testing.T) { assert.Error(t, cfg.Valid()) } - func Test_Config_NoPool(t *testing.T) { cfg := &Config{ Enable: true, @@ -77,6 +76,29 @@ func Test_Config_NoPool(t *testing.T) { Workers: &roadrunner.ServerConfig{ Command: "php php-src/tests/client.php echo pipes", Relay: "pipes", + Pool: &roadrunner.Config{ + NumWorkers: 0, + AllocateTimeout: time.Second, + DestroyTimeout: time.Second, + }, + }, + } + + assert.Error(t, cfg.Valid()) +} + +func Test_Config_DeadPool(t *testing.T) { + cfg := &Config{ + Enable: true, + Address: ":8080", + MaxRequest: 1024, + Uploads: &UploadsConfig{ + Dir: os.TempDir(), + Forbid: []string{".go"}, + }, + Workers: &roadrunner.ServerConfig{ + Command: "php php-src/tests/client.php echo pipes", + Relay: "pipes", }, } |