diff options
author | Valery Piashchynski <[email protected]> | 2021-01-23 17:54:58 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-01-23 17:54:58 +0300 |
commit | 01a6fab935fc2e40d7b6c17ab75a20a74ca23d1d (patch) | |
tree | 59967433eb8220e60020011873623a7454941314 /tests/plugins | |
parent | 29d6020a9e8a3713b22269ed946547c96c24d3da (diff) |
Stabilization PR
Diffstat (limited to 'tests/plugins')
24 files changed, 34 insertions, 34 deletions
diff --git a/tests/plugins/checker/configs/.rr-checker-init.yaml b/tests/plugins/checker/configs/.rr-checker-init.yaml index 36130382..5149d27c 100755 --- a/tests/plugins/checker/configs/.rr-checker-init.yaml +++ b/tests/plugins/checker/configs/.rr-checker-init.yaml @@ -15,7 +15,7 @@ status: address: "127.0.0.1:34333" logs: mode: development - level: debug + level: error http: debug: true address: 127.0.0.1:11933 diff --git a/tests/plugins/checker/plugin_test.go b/tests/plugins/checker/plugin_test.go index c346d91a..5e391158 100644 --- a/tests/plugins/checker/plugin_test.go +++ b/tests/plugins/checker/plugin_test.go @@ -12,7 +12,7 @@ import ( "testing" "time" - "github.com/spiral/endure" + endure "github.com/spiral/endure/pkg/container" goridgeRpc "github.com/spiral/goridge/v3/pkg/rpc" "github.com/spiral/roadrunner/v2/plugins/checker" "github.com/spiral/roadrunner/v2/plugins/config" diff --git a/tests/plugins/config/config_test.go b/tests/plugins/config/config_test.go index 6d95ba70..364960db 100755 --- a/tests/plugins/config/config_test.go +++ b/tests/plugins/config/config_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/spiral/endure" + endure "github.com/spiral/endure/pkg/container" "github.com/spiral/roadrunner/v2/plugins/config" "github.com/stretchr/testify/assert" ) diff --git a/tests/plugins/gzip/plugin_test.go b/tests/plugins/gzip/plugin_test.go index d525dcc6..66767364 100644 --- a/tests/plugins/gzip/plugin_test.go +++ b/tests/plugins/gzip/plugin_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/golang/mock/gomock" - "github.com/spiral/endure" + endure "github.com/spiral/endure/pkg/container" "github.com/spiral/roadrunner/v2/plugins/config" "github.com/spiral/roadrunner/v2/plugins/gzip" httpPlugin "github.com/spiral/roadrunner/v2/plugins/http" diff --git a/tests/plugins/headers/headers_plugin_test.go b/tests/plugins/headers/headers_plugin_test.go index a2ad3357..82a99dd1 100644 --- a/tests/plugins/headers/headers_plugin_test.go +++ b/tests/plugins/headers/headers_plugin_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/spiral/endure" + endure "github.com/spiral/endure/pkg/container" "github.com/spiral/roadrunner/v2/plugins/config" "github.com/spiral/roadrunner/v2/plugins/headers" httpPlugin "github.com/spiral/roadrunner/v2/plugins/http" diff --git a/tests/plugins/http/http_plugin_test.go b/tests/plugins/http/http_plugin_test.go index 72ae05a0..c530f7d1 100644 --- a/tests/plugins/http/http_plugin_test.go +++ b/tests/plugins/http/http_plugin_test.go @@ -17,7 +17,7 @@ import ( "time" "github.com/golang/mock/gomock" - "github.com/spiral/endure" + endure "github.com/spiral/endure/pkg/container" goridgeRpc "github.com/spiral/goridge/v3/pkg/rpc" "github.com/spiral/roadrunner/v2/interfaces/events" "github.com/spiral/roadrunner/v2/plugins/config" diff --git a/tests/plugins/informer/informer_test.go b/tests/plugins/informer/informer_test.go index d9fc2143..41f1e21a 100644 --- a/tests/plugins/informer/informer_test.go +++ b/tests/plugins/informer/informer_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/spiral/endure" + endure "github.com/spiral/endure/pkg/container" goridgeRpc "github.com/spiral/goridge/v3/pkg/rpc" "github.com/spiral/roadrunner/v2/plugins/config" "github.com/spiral/roadrunner/v2/plugins/informer" diff --git a/tests/plugins/kv/boltdb/configs/.rr-init.yaml b/tests/plugins/kv/boltdb/configs/.rr-init.yaml index 8cfa20e9..bc404d8c 100644 --- a/tests/plugins/kv/boltdb/configs/.rr-init.yaml +++ b/tests/plugins/kv/boltdb/configs/.rr-init.yaml @@ -13,7 +13,7 @@ server: logs: mode: development - level: debug + level: error http: address: 127.0.0.1:44933 diff --git a/tests/plugins/kv/boltdb/plugin_test.go b/tests/plugins/kv/boltdb/plugin_test.go index 5548402d..3a4542ff 100644 --- a/tests/plugins/kv/boltdb/plugin_test.go +++ b/tests/plugins/kv/boltdb/plugin_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/spiral/endure" + endure "github.com/spiral/endure/pkg/container" goridgeRpc "github.com/spiral/goridge/v3/pkg/rpc" "github.com/spiral/roadrunner/v2/plugins/config" httpPlugin "github.com/spiral/roadrunner/v2/plugins/http" @@ -23,7 +23,7 @@ import ( ) func TestBoltDb(t *testing.T) { - cont, err := endure.NewContainer(nil, endure.SetLogLevel(endure.DebugLevel)) + cont, err := endure.NewContainer(nil, endure.SetLogLevel(endure.ErrorLevel)) assert.NoError(t, err) cfg := &config.Viper{ diff --git a/tests/plugins/kv/memcached/configs/.rr-init.yaml b/tests/plugins/kv/memcached/configs/.rr-init.yaml index 66ed75cf..34fb4a7d 100644 --- a/tests/plugins/kv/memcached/configs/.rr-init.yaml +++ b/tests/plugins/kv/memcached/configs/.rr-init.yaml @@ -13,7 +13,7 @@ server: logs: mode: development - level: debug + level: error http: address: 127.0.0.1:44933 diff --git a/tests/plugins/kv/memcached/plugin_test.go b/tests/plugins/kv/memcached/plugin_test.go index d4cb58bb..3878ef67 100644 --- a/tests/plugins/kv/memcached/plugin_test.go +++ b/tests/plugins/kv/memcached/plugin_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/spiral/endure" + endure "github.com/spiral/endure/pkg/container" goridgeRpc "github.com/spiral/goridge/v3/pkg/rpc" "github.com/spiral/roadrunner/v2/plugins/config" httpPlugin "github.com/spiral/roadrunner/v2/plugins/http" @@ -23,7 +23,7 @@ import ( ) func TestMemcache(t *testing.T) { - cont, err := endure.NewContainer(nil, endure.SetLogLevel(endure.DebugLevel)) + cont, err := endure.NewContainer(nil, endure.SetLogLevel(endure.ErrorLevel)) assert.NoError(t, err) cfg := &config.Viper{ diff --git a/tests/plugins/kv/memory/configs/.rr-init.yaml b/tests/plugins/kv/memory/configs/.rr-init.yaml index e352fad2..7af2d65f 100644 --- a/tests/plugins/kv/memory/configs/.rr-init.yaml +++ b/tests/plugins/kv/memory/configs/.rr-init.yaml @@ -13,7 +13,7 @@ server: logs: mode: development - level: debug + level: error http: address: 127.0.0.1:44933 diff --git a/tests/plugins/kv/memory/plugin_test.go b/tests/plugins/kv/memory/plugin_test.go index ee01fabb..528403d0 100644 --- a/tests/plugins/kv/memory/plugin_test.go +++ b/tests/plugins/kv/memory/plugin_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/spiral/endure" + endure "github.com/spiral/endure/pkg/container" goridgeRpc "github.com/spiral/goridge/v3/pkg/rpc" "github.com/spiral/roadrunner/v2/plugins/config" httpPlugin "github.com/spiral/roadrunner/v2/plugins/http" @@ -23,7 +23,7 @@ import ( ) func TestInMemory(t *testing.T) { - cont, err := endure.NewContainer(nil, endure.SetLogLevel(endure.DebugLevel)) + cont, err := endure.NewContainer(nil, endure.SetLogLevel(endure.ErrorLevel)) assert.NoError(t, err) cfg := &config.Viper{ diff --git a/tests/plugins/logger/.rr.yaml b/tests/plugins/logger/.rr.yaml index cb555ec3..5ab359d3 100644 --- a/tests/plugins/logger/.rr.yaml +++ b/tests/plugins/logger/.rr.yaml @@ -1,3 +1,3 @@ logs: mode: development - level: debug
\ No newline at end of file + level: error
\ No newline at end of file diff --git a/tests/plugins/logger/logger_test.go b/tests/plugins/logger/logger_test.go index cc788be3..63f233ee 100644 --- a/tests/plugins/logger/logger_test.go +++ b/tests/plugins/logger/logger_test.go @@ -6,7 +6,7 @@ import ( "sync" "testing" - "github.com/spiral/endure" + endure "github.com/spiral/endure/pkg/container" "github.com/spiral/roadrunner/v2/plugins/config" "github.com/spiral/roadrunner/v2/plugins/logger" "github.com/stretchr/testify/assert" diff --git a/tests/plugins/metrics/metrics_test.go b/tests/plugins/metrics/metrics_test.go index c94d51bc..4e81a65f 100644 --- a/tests/plugins/metrics/metrics_test.go +++ b/tests/plugins/metrics/metrics_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/spiral/endure" + endure "github.com/spiral/endure/pkg/container" goridgeRpc "github.com/spiral/goridge/v3/pkg/rpc" "github.com/spiral/roadrunner/v2/plugins/config" "github.com/spiral/roadrunner/v2/plugins/logger" diff --git a/tests/plugins/redis/redis_plugin_test.go b/tests/plugins/redis/redis_plugin_test.go index eba05752..96a191a1 100644 --- a/tests/plugins/redis/redis_plugin_test.go +++ b/tests/plugins/redis/redis_plugin_test.go @@ -10,7 +10,7 @@ import ( "github.com/alicebob/miniredis/v2" "github.com/golang/mock/gomock" - "github.com/spiral/endure" + endure "github.com/spiral/endure/pkg/container" "github.com/spiral/roadrunner/v2/plugins/config" "github.com/spiral/roadrunner/v2/plugins/redis" "github.com/spiral/roadrunner/v2/tests/mocks" diff --git a/tests/plugins/reload/reload_plugin_test.go b/tests/plugins/reload/reload_plugin_test.go index 81ac3c44..9007541b 100644 --- a/tests/plugins/reload/reload_plugin_test.go +++ b/tests/plugins/reload/reload_plugin_test.go @@ -14,7 +14,7 @@ import ( "time" "github.com/golang/mock/gomock" - "github.com/spiral/endure" + endure "github.com/spiral/endure/pkg/container" "github.com/spiral/errors" "github.com/spiral/roadrunner/v2/plugins/config" httpPlugin "github.com/spiral/roadrunner/v2/plugins/http" diff --git a/tests/plugins/resetter/resetter_test.go b/tests/plugins/resetter/resetter_test.go index 89dd43c7..6e206c7d 100644 --- a/tests/plugins/resetter/resetter_test.go +++ b/tests/plugins/resetter/resetter_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/spiral/endure" + endure "github.com/spiral/endure/pkg/container" goridgeRpc "github.com/spiral/goridge/v3/pkg/rpc" "github.com/spiral/roadrunner/v2/plugins/config" "github.com/spiral/roadrunner/v2/plugins/logger" diff --git a/tests/plugins/rpc/rpc_test.go b/tests/plugins/rpc/rpc_test.go index 98959b28..49d3b3f1 100644 --- a/tests/plugins/rpc/rpc_test.go +++ b/tests/plugins/rpc/rpc_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/spiral/endure" + endure "github.com/spiral/endure/pkg/container" "github.com/spiral/errors" "github.com/spiral/roadrunner/v2/plugins/config" "github.com/spiral/roadrunner/v2/plugins/logger" diff --git a/tests/plugins/server/server_plugin_test.go b/tests/plugins/server/server_plugin_test.go index d63b0ccd..f600832a 100644 --- a/tests/plugins/server/server_plugin_test.go +++ b/tests/plugins/server/server_plugin_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/spiral/endure" + endure "github.com/spiral/endure/pkg/container" "github.com/spiral/roadrunner/v2/plugins/config" "github.com/spiral/roadrunner/v2/plugins/logger" "github.com/spiral/roadrunner/v2/plugins/server" diff --git a/tests/plugins/static/configs/.rr-http-static-disabled.yaml b/tests/plugins/static/configs/.rr-http-static-disabled.yaml index e31baffc..9f04b8a9 100644 --- a/tests/plugins/static/configs/.rr-http-static-disabled.yaml +++ b/tests/plugins/static/configs/.rr-http-static-disabled.yaml @@ -11,7 +11,7 @@ http: debug: true address: 127.0.0.1:21234 max_request_size: 1024 - middleware: [ "gzip", "static" ] + middleware: [ "gzip" ] trusted_subnets: [ "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" ] uploads: forbid: [ ".php", ".exe", ".bat" ] @@ -19,10 +19,9 @@ http: dir: "abc" #not exists forbid: [ ".php", ".htaccess" ] request: - "Example-Request-Header": "Value" - # Automatically add headers to every response. + Example-Request-Header: "Value" response: - "X-Powered-By": "RoadRunner" + X-Powered-By: "RoadRunner" pool: num_workers: 2 max_jobs: 0 diff --git a/tests/plugins/static/configs/.rr-http-static-files-disable.yaml b/tests/plugins/static/configs/.rr-http-static-files-disable.yaml index deb408db..3d4d50b9 100644 --- a/tests/plugins/static/configs/.rr-http-static-files-disable.yaml +++ b/tests/plugins/static/configs/.rr-http-static-files-disable.yaml @@ -11,7 +11,7 @@ http: debug: true address: 127.0.0.1:45877 max_request_size: 1024 - middleware: [ "gzip", "static" ] + middleware: [ "gzip" ] trusted_subnets: [ "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" ] uploads: forbid: [ ".php", ".exe", ".bat" ] @@ -19,10 +19,10 @@ http: dir: "../../../tests" forbid: [ ".php" ] request: - "Example-Request-Header": "Value" + Example-Request-Header: "Value" # Automatically add headers to every response. response: - "X-Powered-By": "RoadRunner" + X-Powered-By: "RoadRunner" pool: num_workers: 2 max_jobs: 0 diff --git a/tests/plugins/static/static_plugin_test.go b/tests/plugins/static/static_plugin_test.go index 49721e44..d43ef765 100644 --- a/tests/plugins/static/static_plugin_test.go +++ b/tests/plugins/static/static_plugin_test.go @@ -13,7 +13,7 @@ import ( "time" "github.com/golang/mock/gomock" - "github.com/spiral/endure" + endure "github.com/spiral/endure/pkg/container" "github.com/spiral/roadrunner/v2/plugins/config" "github.com/spiral/roadrunner/v2/plugins/gzip" httpPlugin "github.com/spiral/roadrunner/v2/plugins/http" @@ -209,8 +209,9 @@ func TestStaticDisabled(t *testing.T) { func staticDisabled(t *testing.T) { _, r, err := get("http://localhost:21234/sample.txt") //nolint:bodyclose - assert.Error(t, err) - assert.Nil(t, r) + assert.NoError(t, err) + assert.NotNil(t, r) + assert.Empty(t, r.Header.Get("X-Powered-By")) } func TestStaticFilesDisabled(t *testing.T) { |