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

Remove unnecessary creds list's size check

Signed-off-by: Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
This commit is contained in:
Nassim 'Nass' Eddequiouaq
2017-03-10 16:59:57 +01:00
parent 47566329ff
commit 2f2e85cfb9
+4 -7
View File
@@ -26,16 +26,13 @@ func TestSecretServiceHelper(t *testing.T) {
// If any docker credentials with the tests values we are providing, we
// remove them as they probably come from a previous failed test
if len(old_auths) >= 1 {
for k, v := range old_auths {
if strings.Compare(k, creds.ServerURL) == 0 && strings.Compare(v, creds.Username) == 0 {
for k, v := range old_auths {
if strings.Compare(k, creds.ServerURL) == 0 && strings.Compare(v, creds.Username) == 0 {
if err := helper.Delete(creds.ServerURL); err != nil {
t.Fatal(err)
}
if err := helper.Delete(creds.ServerURL); err != nil {
t.Fatal(err)
}
}
}
// Check again how many docker credentials we have when starting the test