Skip to content

Commit 2f2e85c

Browse files
committed
Remove unnecessary creds list's size check
Signed-off-by: Nassim 'Nass' Eddequiouaq <[email protected]>
1 parent 4756632 commit 2f2e85c

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

secretservice/secretservice_linux_test.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,13 @@ func TestSecretServiceHelper(t *testing.T) {
2626

2727
// If any docker credentials with the tests values we are providing, we
2828
// remove them as they probably come from a previous failed test
29-
if len(old_auths) >= 1 {
30-
for k, v := range old_auths {
31-
if strings.Compare(k, creds.ServerURL) == 0 && strings.Compare(v, creds.Username) == 0 {
29+
for k, v := range old_auths {
30+
if strings.Compare(k, creds.ServerURL) == 0 && strings.Compare(v, creds.Username) == 0 {
3231

33-
if err := helper.Delete(creds.ServerURL); err != nil {
34-
t.Fatal(err)
35-
}
32+
if err := helper.Delete(creds.ServerURL); err != nil {
33+
t.Fatal(err)
3634
}
3735
}
38-
3936
}
4037

4138
// Check again how many docker credentials we have when starting the test

0 commit comments

Comments
 (0)