summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-05-13 19:32:04 +0300
committerValery Piashchynski <[email protected]>2021-05-13 19:32:04 +0300
commit7ee84c5fd7cd57b97e2cb2005b37784183800ae0 (patch)
tree6a718020f9faabdba417d74110f7acd4382dff24
parent2be94ad0400e2f523d87f47e09a7bf505edef689 (diff)
- Update tests
Signed-off-by: Valery Piashchynski <[email protected]>
-rw-r--r--plugins/server/config.go2
-rw-r--r--plugins/server/plugin.go3
-rw-r--r--tests/plugins/http/http_plugin_test.go2
-rw-r--r--tests/plugins/server/configs/.rr-no-app-section.yaml6
-rw-r--r--tests/plugins/server/configs/.rr-sockets.yaml6
-rw-r--r--tests/plugins/server/configs/.rr-tcp.yaml6
-rw-r--r--tests/plugins/server/configs/.rr-wrong-command.yaml6
-rw-r--r--tests/plugins/server/configs/.rr-wrong-relay.yaml6
-rw-r--r--tests/plugins/server/configs/.rr.yaml6
9 files changed, 21 insertions, 22 deletions
diff --git a/plugins/server/config.go b/plugins/server/config.go
index a4b0d91c..00ce4140 100644
--- a/plugins/server/config.go
+++ b/plugins/server/config.go
@@ -4,7 +4,7 @@ import (
"time"
)
-// All config (.rr.yaml)
+// Config All config (.rr.yaml)
// For other section use pointer to distinguish between `empty` and `not present`
type Config struct {
// Server config section
diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go
index 320da372..ef77f7ab 100644
--- a/plugins/server/plugin.go
+++ b/plugins/server/plugin.go
@@ -58,8 +58,7 @@ func (server *Plugin) Name() string {
}
// Available interface implementation
-func (server *Plugin) Available() {
-}
+func (server *Plugin) Available() {}
// Serve (Start) server plugin (just a mock here to satisfy interface)
func (server *Plugin) Serve() chan error {
diff --git a/tests/plugins/http/http_plugin_test.go b/tests/plugins/http/http_plugin_test.go
index bc122588..128eec26 100644
--- a/tests/plugins/http/http_plugin_test.go
+++ b/tests/plugins/http/http_plugin_test.go
@@ -1807,7 +1807,7 @@ func serveStaticSampleNotAllowedPath(t *testing.T) {
_, r, err := get("http://localhost:21603/../../../../tests/../static/sample.txt")
assert.NoError(t, err)
- assert.Equal(t, 200, r.StatusCode)
+ assert.Equal(t, 403, r.StatusCode)
_ = r.Body.Close()
}
diff --git a/tests/plugins/server/configs/.rr-no-app-section.yaml b/tests/plugins/server/configs/.rr-no-app-section.yaml
index e44eeb56..d28265d5 100644
--- a/tests/plugins/server/configs/.rr-no-app-section.yaml
+++ b/tests/plugins/server/configs/.rr-no-app-section.yaml
@@ -3,10 +3,10 @@ server:
user: ""
group: ""
env:
- "RR_CONFIG": "/some/place/on/the/C134"
- "RR_CONFIG2": "C138"
+ - RR_CONFIG: "/some/place/on/the/C134"
+ - RR_CONFIG2: "C138"
relay: "pipes"
relay_timeout: "20s"
logs:
mode: development
- level: error \ No newline at end of file
+ level: error
diff --git a/tests/plugins/server/configs/.rr-sockets.yaml b/tests/plugins/server/configs/.rr-sockets.yaml
index 0bc2d0f9..4c57f36f 100644
--- a/tests/plugins/server/configs/.rr-sockets.yaml
+++ b/tests/plugins/server/configs/.rr-sockets.yaml
@@ -3,10 +3,10 @@ server:
user: ""
group: ""
env:
- "RR_CONFIG": "/some/place/on/the/C134"
- "RR_CONFIG2": "C138"
+ - RR_CONFIG: "/some/place/on/the/C134"
+ - RR_CONFIG2: "C138"
relay: "unix://unix.sock"
relay_timeout: "20s"
logs:
mode: development
- level: error \ No newline at end of file
+ level: error
diff --git a/tests/plugins/server/configs/.rr-tcp.yaml b/tests/plugins/server/configs/.rr-tcp.yaml
index f4580460..4582482f 100644
--- a/tests/plugins/server/configs/.rr-tcp.yaml
+++ b/tests/plugins/server/configs/.rr-tcp.yaml
@@ -3,10 +3,10 @@ server:
user: ""
group: ""
env:
- "RR_CONFIG": "/some/place/on/the/C134"
- "RR_CONFIG2": "C138"
+ - RR_CONFIG: "/some/place/on/the/C134"
+ - RR_CONFIG2: "C138"
relay: "tcp://localhost:9999"
relay_timeout: "20s"
logs:
mode: development
- level: error \ No newline at end of file
+ level: error
diff --git a/tests/plugins/server/configs/.rr-wrong-command.yaml b/tests/plugins/server/configs/.rr-wrong-command.yaml
index c97d8b7e..9d105d90 100644
--- a/tests/plugins/server/configs/.rr-wrong-command.yaml
+++ b/tests/plugins/server/configs/.rr-wrong-command.yaml
@@ -3,10 +3,10 @@ server:
user: ""
group: ""
env:
- "RR_CONFIG": "/some/place/on/the/C134"
- "RR_CONFIG2": "C138"
+ - RR_CONFIG: "/some/place/on/the/C134"
+ - RR_CONFIG2: "C138"
relay: "pipes"
relay_timeout: "20s"
logs:
mode: development
- level: error \ No newline at end of file
+ level: error
diff --git a/tests/plugins/server/configs/.rr-wrong-relay.yaml b/tests/plugins/server/configs/.rr-wrong-relay.yaml
index 9722a487..c4d1edb0 100644
--- a/tests/plugins/server/configs/.rr-wrong-relay.yaml
+++ b/tests/plugins/server/configs/.rr-wrong-relay.yaml
@@ -3,10 +3,10 @@ server:
user: ""
group: ""
env:
- "RR_CONFIG": "/some/place/on/the/C134"
- "RR_CONFIG2": "C138"
+ - RR_CONFIG: "/some/place/on/the/C134"
+ - RR_CONFIG2: "C138"
relay: "pupes"
relay_timeout: "20s"
logs:
mode: development
- level: error \ No newline at end of file
+ level: error
diff --git a/tests/plugins/server/configs/.rr.yaml b/tests/plugins/server/configs/.rr.yaml
index e44eeb56..d28265d5 100644
--- a/tests/plugins/server/configs/.rr.yaml
+++ b/tests/plugins/server/configs/.rr.yaml
@@ -3,10 +3,10 @@ server:
user: ""
group: ""
env:
- "RR_CONFIG": "/some/place/on/the/C134"
- "RR_CONFIG2": "C138"
+ - RR_CONFIG: "/some/place/on/the/C134"
+ - RR_CONFIG2: "C138"
relay: "pipes"
relay_timeout: "20s"
logs:
mode: development
- level: error \ No newline at end of file
+ level: error