Skip to content

Commit 173fe2d

Browse files
committed
fixed a bug in the test for osx
Signed-off-by: avaid96 <[email protected]>
1 parent b3ebaa4 commit 173fe2d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

osxkeychain/osxkeychain_darwin_test.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,17 @@ func TestOSXKeychainHelper(t *testing.T) {
3939
t.Fatal(err)
4040
}
4141

42-
if err := helper.Delete(creds.ServerURL); err != nil {
43-
t.Fatal(err)
44-
}
45-
4642
helper.Add(creds1)
4743
defer helper.Delete(creds1.ServerURL)
4844
newpaths, newaccts, err := helper.List()
4945
if len(newpaths)-len(paths) != 1 || len(newaccts)-len(accts) != 1 {
46+
if(err == nil) {
47+
t.Fatalf("Error: len(newpaths): %d, len(paths): %d\n len(newaccts): %d, len(accts): %d\n Error= %s", len(newpaths), len(paths), len(newaccts), len(accts), nil)
48+
}
49+
t.Fatalf("Error: len(newpaths): %d, len(paths): %d\n len(newaccts): %d, len(accts): %d\n Error= %s", len(newpaths), len(paths), len(newaccts), len(accts), err.Error())
50+
}
51+
52+
if err := helper.Delete(creds.ServerURL); err != nil {
5053
t.Fatal(err)
5154
}
5255
}

0 commit comments

Comments
 (0)