1
0
mirror of https://github.com/docker/docker-credential-helpers.git synced 2026-06-13 16:01:28 +05:30

added better test for list in linux

Signed-off-by: Avi Vaid <avaid1996@gmail.com>
This commit is contained in:
Avi Vaid
2016-07-12 02:52:44 -04:00
parent 205e3b3056
commit 59b3d54595
+6 -1
View File
@@ -36,7 +36,12 @@ func TestSecretServiceHelper(t *testing.T) {
if err := helper.Delete(creds.ServerURL); err != nil {
t.Fatal(err)
}
if _, _, err := helper.List(); err != nil {
paths, accts, err := helper.List()
if err != nil || len(paths) == 0 || len(accts) == 0 {
t.Fatal(err)
}
helper.Add(creds)
if newpaths, newaccts, err := helper.List(); (len(newpaths)-len(paths)) != 1 || (len(newaccts)-len(accts)) != 1 {
t.Fatal(err)
}
}