summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.golangci.yml9
-rw-r--r--plugins/http/tests/configs/.rr-http.yaml2
-rw-r--r--plugins/http/tests/http_test.go9
-rw-r--r--plugins/server/plugin.go2
4 files changed, 12 insertions, 10 deletions
diff --git a/.golangci.yml b/.golangci.yml
index b7415b25..59dc0ae6 100755
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -1,7 +1,10 @@
-linters:
+run:
skip-files:
- - ".*\\test\\.go$"
- - lib/bad.go
+ - plugins/http/tests/http_test.go
+ - plugins/http/tests/plugin_test_old.go
+ - plugins/http/tests/rpc_test_old.go
+ - plugins/http/tests/config_test.go
+linters:
disable-all: true
enable:
- bodyclose
diff --git a/plugins/http/tests/configs/.rr-http.yaml b/plugins/http/tests/configs/.rr-http.yaml
index caf7dfe3..3c2ec5a9 100644
--- a/plugins/http/tests/configs/.rr-http.yaml
+++ b/plugins/http/tests/configs/.rr-http.yaml
@@ -28,7 +28,7 @@ http:
key: fixtures/server.key
# rootCa: root.crt
fcgi:
- address: tcp://0.0.0.0:6921
+ address: tcp://0.0.0.0:7921
http2:
enabled: false
h2c: false
diff --git a/plugins/http/tests/http_test.go b/plugins/http/tests/http_test.go
index 47ad0e51..d5db1896 100644
--- a/plugins/http/tests/http_test.go
+++ b/plugins/http/tests/http_test.go
@@ -43,7 +43,6 @@ func TestHTTPInit(t *testing.T) {
err = cont.RegisterAll(
cfg,
- &rpcPlugin.Plugin{},
&logger.ZapLogger{},
&server.Plugin{},
&httpPlugin.Plugin{},
@@ -63,8 +62,9 @@ func TestHTTPInit(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(1)
+
go func() {
- tt := time.NewTimer(time.Second * 2)
+ tt := time.NewTimer(time.Second * 5)
defer wg.Done()
for {
select {
@@ -403,7 +403,6 @@ func TestFastCGI_RequestUri(t *testing.T) {
err = cont.RegisterAll(
cfg,
- &rpcPlugin.Plugin{},
&logger.ZapLogger{},
&server.Plugin{},
&httpPlugin.Plugin{},
@@ -451,11 +450,11 @@ func TestFastCGI_RequestUri(t *testing.T) {
}
}()
- t.Run("FastCGIServiceRequestUri", fcgiReqUri)
+ t.Run("FastCGIServiceRequestUri", fcgiReqURI)
wg.Wait()
}
-func fcgiReqUri(t *testing.T) {
+func fcgiReqURI(t *testing.T) {
fcgiConnFactory := gofast.SimpleConnFactory("tcp", "0.0.0.0:6921")
fcgiHandler := gofast.NewHandler(
diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go
index a655a8d2..3411b007 100644
--- a/plugins/server/plugin.go
+++ b/plugins/server/plugin.go
@@ -74,7 +74,7 @@ func (server *Plugin) CmdFactory(env server.Env) (func() *exec.Cmd, error) {
return nil, errors.E(op, errors.Str("first arg in command should be `php`"))
}
return func() *exec.Cmd {
- cmd := exec.Command(cmdArgs[0], cmdArgs[1:]...)
+ cmd := exec.Command(cmdArgs[0], cmdArgs[1:]...) //nolint:gosec
util.IsolateProcess(cmd)
// if user is not empty, and OS is linux or macos