Skip to content

Commit

Permalink
Add a unit test for type-less events.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpromislow committed Oct 18, 2024
1 parent 261800d commit b1a15a1
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions pkg/resources/virtual/events/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,31 @@ func TestTransformEvents(t *testing.T) {
},
},
},
{
name: "don't change typeless events",
input: &unstructured.Unstructured{
Object: map[string]interface{}{
"apiVersion": "/v1",
"kind": "Event",
"metadata": map[string]interface{}{
"name": "carysFarm",
"namespace": "carysNamespace",
},
"id": "eventTest3id",
},
},
wantOutput: &unstructured.Unstructured{
Object: map[string]interface{}{
"apiVersion": "/v1",
"kind": "Event",
"metadata": map[string]interface{}{
"name": "carysFarm",
"namespace": "carysNamespace",
},
"id": "eventTest3id",
},
},
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
Expand Down

0 comments on commit b1a15a1

Please sign in to comment.