b6bb3098bc
many other updates
25 lines
548 B
Go
25 lines
548 B
Go
package tests
|
|
|
|
import (
|
|
"apigo.cloud/git/apigo/gojs"
|
|
"apigo.cloud/git/apigo/plugin"
|
|
_ "apigo.cloud/git/apigo/plugins/redis"
|
|
"testing"
|
|
)
|
|
|
|
func TestRedis(t *testing.T) {
|
|
rdServer := StartRedis("16378")
|
|
defer rdServer.Close()
|
|
|
|
gojs.SetPluginsConfig(map[string]plugin.Config{
|
|
"apigo.cloud/git/apigo/plugins/redis": {
|
|
"default": "redis://localhost:16378",
|
|
"configs": map[string]string{
|
|
"bak": "redis://localhost:16378/2",
|
|
},
|
|
},
|
|
})
|
|
r, err := gojs.RunFile("redis_test.js", nil)
|
|
Test(t, "get", r == true && err == nil, r, err)
|
|
}
|