diff options
author | Valery Piashchynski <[email protected]> | 2020-11-16 14:21:35 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-11-16 14:21:35 +0300 |
commit | 57ad958acab2d108be0a35547faf6e7a791cf069 (patch) | |
tree | 3c519708540265a7e74b03d1fe17ef4101ffcfdf /plugins/http/test | |
parent | d890eee1742dc3a0a1c787f7e65d40b1e81a94db (diff) |
Update Pool
Diffstat (limited to 'plugins/http/test')
-rw-r--r-- | plugins/http/test/http_test.go | 23 | ||||
-rw-r--r-- | plugins/http/test/rr-http.yaml | 67 |
2 files changed, 90 insertions, 0 deletions
diff --git a/plugins/http/test/http_test.go b/plugins/http/test/http_test.go new file mode 100644 index 00000000..c109d930 --- /dev/null +++ b/plugins/http/test/http_test.go @@ -0,0 +1,23 @@ +package test + +import ( + "testing" + + "github.com/spiral/endure" + "github.com/spiral/roadrunner/v2/plugins/config" + "github.com/stretchr/testify/assert" +) + +func TestHTTPInit(t *testing.T) { + cont, err := endure.NewContainer(nil, endure.SetLogLevel(endure.DebugLevel), endure.Visualize(endure.StdOut, "")) + assert.NoError(t, err) + + cfg := &config.Viper{ + Path: ".rr-http.yaml", + Prefix: "", + } + err = cont.RegisterAll( + + ) + assert.NoError(t, err) +} diff --git a/plugins/http/test/rr-http.yaml b/plugins/http/test/rr-http.yaml new file mode 100644 index 00000000..8a70ce1c --- /dev/null +++ b/plugins/http/test/rr-http.yaml @@ -0,0 +1,67 @@ +http: + address: 0.0.0.0:8080 + maxRequestSize: 200 + uploads: + forbid: [ ".php", ".exe", ".bat" ] + trustedSubnets: [ "10.0.0.0/8", "127.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "::1/128", "fc00::/7", "fe80::/10" ] + + ssl: + port: 443 + redirect: true + cert: server.crt + key: server.key + rootCa: root.crt + fcgi: + address: tcp://0.0.0.0:6920 + http2: + enabled: true + h2c: true + maxConcurrentStreams: 128 + + workers: + command: "php psr-worker.php pipes" + user: "" + + # connection method (pipes, tcp://:9000, unix://socket.unix). default "pipes" + relay: "pipes" + + pool: + numWorkers: 4 + maxJobs: 0 + allocateTimeout: 60 + destroyTimeout: 60 + + +transport: + http: + address: 0.0.0.0:8080 + maxRequestSize: 200 + uploads: + forbid: [ ".php", ".exe", ".bat" ] + trustedSubnets: [ "10.0.0.0/8", "127.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "::1/128", "fc00::/7", "fe80::/10" ] + + ssl: + port: 443 + redirect: true + cert: server.crt + key: server.key + rootCa: root.crt + fcgi: + address: tcp://0.0.0.0:6920 + http2: + enabled: true + h2c: true + maxConcurrentStreams: 128 + + workers: + command: "php psr-worker.php pipes" + user: "" + + # connection method (pipes, tcp://:9000, unix://socket.unix). default "pipes" + relay: "pipes" + + pool: + numWorkers: 4 + maxJobs: 0 + allocateTimeout: 60 + destroyTimeout: 60
\ No newline at end of file |