Skip to content

Commit

Permalink
🟢 tests now verify that annotations are nil
Browse files Browse the repository at this point in the history
afaics, we do not require these objects to exist if they are empty

Signed-off-by: Dominik Richter <[email protected]>
  • Loading branch information
arlimus committed Mar 21, 2024
1 parent 667f39f commit aab1faa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions providers-sdk/v1/inventory/asset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestAddAnnotations(t *testing.T) {
},
}
asset.AddAnnotations(map[string]string{})
assert.Equal(t, map[string]string{}, asset.Annotations)
assert.Equal(t, nil, asset.Annotations)
})

t.Run("test nil", func(t *testing.T) {
Expand All @@ -53,7 +53,7 @@ func TestAddAnnotations(t *testing.T) {
},
}
asset.AddAnnotations(nil)
assert.Equal(t, map[string]string{}, asset.Annotations)
assert.Equal(t, nil, asset.Annotations)
})

t.Run("test merge", func(t *testing.T) {
Expand Down

0 comments on commit aab1faa

Please sign in to comment.