Skip to content

Commit

Permalink
[processor/geoipprocessor] Remove unused field
Browse files Browse the repository at this point in the history
  • Loading branch information
bencehornak committed Jan 2, 2025
1 parent 7ec077e commit 22cd8a2
Showing 1 changed file with 24 additions and 32 deletions.
56 changes: 24 additions & 32 deletions processor/geoipprocessor/geoip_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,52 +82,44 @@ var baseProviderMock = providerMock{
}

var testCases = []struct {
name string
goldenDir string
context ContextID
lookupAttributes []attribute.Key
name string
goldenDir string
context ContextID
}{
{
name: "default source.address attribute, not found",
goldenDir: "no_source_address",
context: resource,
lookupAttributes: defaultResourceAttributes,
name: "default source.address attribute, not found",
goldenDir: "no_source_address",
context: resource,
},
{
name: "default source.address attribute",
goldenDir: "source_address",
context: resource,
lookupAttributes: defaultResourceAttributes,
name: "default source.address attribute",
goldenDir: "source_address",
context: resource,
},
{
name: "default source.address attribute no geo metadata found by providers",
goldenDir: "source_address_geo_not_found",
context: resource,
lookupAttributes: defaultResourceAttributes,
name: "default source.address attribute no geo metadata found by providers",
goldenDir: "source_address_geo_not_found",
context: resource,
},
{
name: "default source.ip attribute with an unspecified IP address should be skipped",
goldenDir: "unspecified_address",
context: resource,
lookupAttributes: defaultResourceAttributes,
name: "default source.ip attribute with an unspecified IP address should be skipped",
goldenDir: "unspecified_address",
context: resource,
},
{
name: "custom source attributes",
goldenDir: "custom_sources",
context: resource,
lookupAttributes: []attribute.Key{"ip", "host.ip"},
name: "custom source attributes",
goldenDir: "custom_sources",
context: resource,
},
{
name: "do not add resource attributes with an invalid ip",
goldenDir: "invalid_address",
context: resource,
lookupAttributes: defaultResourceAttributes,
name: "do not add resource attributes with an invalid ip",
goldenDir: "invalid_address",
context: resource,
},
{
name: "source address located in inner attributes",
goldenDir: "attribute_source_address",
context: record,
lookupAttributes: defaultResourceAttributes,
name: "source address located in inner attributes",
goldenDir: "attribute_source_address",
context: record,
},
}

Expand Down

0 comments on commit 22cd8a2

Please sign in to comment.