From e2ba60d3aceb0dbc308dfd7ddbdb15a7e6a3503b Mon Sep 17 00:00:00 2001 From: Collin Montag Date: Mon, 18 May 2020 15:07:23 -0400 Subject: [PATCH] added importuser test --- api/keystore/service_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/api/keystore/service_test.go b/api/keystore/service_test.go index 75b7166..b4c805d 100644 --- a/api/keystore/service_test.go +++ b/api/keystore/service_test.go @@ -255,6 +255,17 @@ func TestServiceExportImport(t *testing.T) { newKS := Keystore{} newKS.Initialize(logging.NoLog{}, memdb.New()) + { + reply := ImportUserReply{} + if err := newKS.ImportUser(nil, &ImportUserArgs{ + Username: "bob", + Password: "", + User: exportReply.User, + }, &reply); err == nil { + t.Fatal("Should have errored due to incorrect password") + } + } + { reply := ImportUserReply{} if err := newKS.ImportUser(nil, &ImportUserArgs{