mirror of
https://github.com/Kong/go-pluginserver.git
synced 2025-09-27 04:26:20 +08:00
tests(*) new plugin name
This commit is contained in:
@@ -18,7 +18,7 @@ before_script:
|
||||
- tar zxvpf rq.tar.gz
|
||||
- go get -v -u golang.org/x/lint/golint
|
||||
- ( cd ~/gopath/src; mkdir -p github.com/Kong; cd github.com/Kong; git clone https://github.com/kong/go-pdk && cd go-pdk && go install )
|
||||
- ( cd ~/gopath/src/github.com/Kong; git clone https://github.com/kong/go-plugins && cd go-plugins && make && cp *.so ../go-pluginserver )
|
||||
- ( cd ~/gopath/src/github.com/Kong; git clone https://github.com/kong/go-plugins && cd go-plugins && git checkout v0.5.0 && make && cp *.so ../go-pluginserver )
|
||||
|
||||
script:
|
||||
- golint ./...
|
||||
|
2
go.mod
2
go.mod
@@ -3,6 +3,6 @@ module github.com/Kong/go-pluginserver
|
||||
go 1.13
|
||||
|
||||
require (
|
||||
github.com/Kong/go-pdk v0.6.0
|
||||
github.com/Kong/go-pdk v0.6.1
|
||||
github.com/ugorji/go/codec v1.2.1
|
||||
)
|
||||
|
10
test.sh
10
test.sh
@@ -71,15 +71,15 @@ msg '[0, 19, "plugin.GetStatus", []]'
|
||||
assert_noerr
|
||||
assert_fld_match 'Plugins' '{}'
|
||||
|
||||
msg '[0, 19, "plugin.GetPluginInfo", ["go-hello"]]'
|
||||
msg '[0, 19, "plugin.GetPluginInfo", ["go-hello-lm"]]'
|
||||
assert_noerr
|
||||
|
||||
msg '[0, 19, "plugin.StartInstance", [{"Name":"go-hello", "Config":"{\"message\":\"howdy\"}"}]]'
|
||||
msg '[0, 19, "plugin.StartInstance", [{"Name":"go-hello-lm", "Config":"{\"message\":\"howdy\"}"}]]'
|
||||
assert_noerr
|
||||
helloId=$(query_result '."Id"')
|
||||
echo "helloId: $helloId"
|
||||
|
||||
msg '[0, 19, "plugin.StartInstance", [{"Name":"go-log", "Config":"{\"reopen\":false, \"path\":\"/some/where/else/\"}"}]]'
|
||||
msg '[0, 19, "plugin.StartInstance", [{"Name":"go-log-lm", "Config":"{\"reopen\":false, \"path\":\"/some/where/else/\"}"}]]'
|
||||
assert_noerr
|
||||
logId=$(query_result '."Id"')
|
||||
echo "logId: $logId"
|
||||
@@ -143,8 +143,8 @@ assert_noerr
|
||||
|
||||
msg '[0, 19, "plugin.GetStatus", []]'
|
||||
assert_noerr
|
||||
assert_fld_match 'Plugins["go-hello"]' '"Name": "go-hello"'
|
||||
assert_fld_match 'Plugins["go-log"]' '"Name": "go-log"'
|
||||
assert_fld_match 'Plugins["go-hello-lm"]' '"Name": "go-hello-lm"'
|
||||
assert_fld_match 'Plugins["go-log-lm"]' '"Name": "go-log-lm"'
|
||||
|
||||
|
||||
if [ ! -v PREVIOUS_SERVER ]; then
|
||||
|
Reference in New Issue
Block a user