Skip to content

Commit

Permalink
Fix options tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalek committed Oct 7, 2020
1 parent dc18129 commit 9502d95
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions processor/k8sprocessor/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,17 @@ func TestWithExtractLabels(t *testing.T) {
func TestWithExtractMetadata(t *testing.T) {
p := &kubernetesprocessor{}
assert.NoError(t, WithExtractMetadata()(p))
// Default
assert.True(t, p.rules.Namespace)
assert.True(t, p.rules.PodName)
assert.True(t, p.rules.PodUID)
assert.True(t, p.rules.StartTime)
assert.True(t, p.rules.Deployment)
assert.True(t, p.rules.Cluster)
assert.True(t, p.rules.Node)
assert.True(t, p.rules.HostName)
assert.True(t, p.rules.ContainerName)
// Optional
assert.False(t, p.rules.HostName)
assert.False(t, p.rules.ContainerName)

p = &kubernetesprocessor{}
err := WithExtractMetadata("randomfield")(p)
Expand Down

0 comments on commit 9502d95

Please sign in to comment.