Add listing to database connections. (#2827)

Fixes #2823
This commit is contained in:
Jeff Mitchell
2017-06-07 10:03:17 -04:00
committed by GitHub
parent 25fd17a9c1
commit 2daf018361
3 changed files with 38 additions and 0 deletions

View File

@@ -185,6 +185,19 @@ func TestBackend_config_connection(t *testing.T) {
if !reflect.DeepEqual(expected, resp.Data) {
t.Fatalf("bad: expected:%#v\nactual:%#v\n", expected, resp.Data)
}
configReq.Operation = logical.ListOperation
configReq.Data = nil
configReq.Path = "config/"
resp, err = b.HandleRequest(configReq)
if err != nil {
t.Fatal(err)
}
keys := resp.Data["keys"].([]string)
key := keys[0]
if key != "plugin-test" {
t.Fatalf("bad key: %q", key)
}
}
func TestBackend_basic(t *testing.T) {