added importuser test

This commit is contained in:
Collin Montag 2020-05-18 15:07:23 -04:00
parent f655592a1c
commit e2ba60d3ac
1 changed files with 11 additions and 0 deletions

View File

@ -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{