Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitlinger committed Jan 10, 2025
1 parent 926ff32 commit b2b46dc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions processor/k8sattributesprocessor/internal/kube/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1019,18 +1019,18 @@ func TestExtractionRules(t *testing.T) {

// manually call the data removal functions here
// normally the informer does this, but fully emulating the informer in this test is annoying
pod := pod.DeepCopy()
podCopy := pod.DeepCopy()
for k, v := range tc.additionalAnnotations {
pod.Annotations[k] = v
podCopy.Annotations[k] = v
}
for k, v := range tc.additionalLabels {
pod.Labels[k] = v
podCopy.Labels[k] = v
}
transformedPod := removeUnnecessaryPodData(pod, c.Rules)
transformedPod := removeUnnecessaryPodData(podCopy, c.Rules)
transformedReplicaset := removeUnnecessaryReplicaSetData(replicaset)
c.handleReplicaSetAdd(transformedReplicaset)
c.handlePodAdd(transformedPod)
p, ok := c.GetPod(newPodIdentifier("connection", "", pod.Status.PodIP))
p, ok := c.GetPod(newPodIdentifier("connection", "", podCopy.Status.PodIP))
require.True(t, ok)

assert.Equal(t, tc.attributes, p.Attributes)
Expand Down

0 comments on commit b2b46dc

Please sign in to comment.