replace Nil with NoError

This commit is contained in:
TheFox0x7 2024-04-10 23:20:34 +02:00
parent 5660e21fb8
commit 599c75c167
No known key found for this signature in database
GPG key ID: 6CA33903484AF7C2

View file

@ -13,13 +13,13 @@ func TestLabelUpdate(t *testing.T) {
ls := labels.Labels{} ls := labels.Labels{}
initialLabel, err := labels.Parse("testlabel:docker://alpine") initialLabel, err := labels.Parse("testlabel:docker://alpine")
assert.Nil(t, err) assert.NoError(t, err)
ls = append(ls, initialLabel) ls = append(ls, initialLabel)
newLs := labels.Labels{} newLs := labels.Labels{}
newLabel, err := labels.Parse("next label:host") newLabel, err := labels.Parse("next label:host")
assert.Nil(t, err) assert.NoError(t, err)
newLs = append(newLs, initialLabel) newLs = append(newLs, initialLabel)
newLs = append(newLs, newLabel) newLs = append(newLs, newLabel)
@ -34,5 +34,4 @@ func TestLabelUpdate(t *testing.T) {
assert.Contains(t, runner.labels, initialLabel) assert.Contains(t, runner.labels, initialLabel)
assert.Contains(t, runner.labels, newLabel) assert.Contains(t, runner.labels, newLabel)
} }