@@ -82,52 +82,44 @@ var baseProviderMock = providerMock{
82
82
}
83
83
84
84
var testCases = []struct {
85
- name string
86
- goldenDir string
87
- context ContextID
88
- lookupAttributes []attribute.Key
85
+ name string
86
+ goldenDir string
87
+ context ContextID
89
88
}{
90
89
{
91
- name : "default source.address attribute, not found" ,
92
- goldenDir : "no_source_address" ,
93
- context : resource ,
94
- lookupAttributes : defaultResourceAttributes ,
90
+ name : "default source.address attribute, not found" ,
91
+ goldenDir : "no_source_address" ,
92
+ context : resource ,
95
93
},
96
94
{
97
- name : "default source.address attribute" ,
98
- goldenDir : "source_address" ,
99
- context : resource ,
100
- lookupAttributes : defaultResourceAttributes ,
95
+ name : "default source.address attribute" ,
96
+ goldenDir : "source_address" ,
97
+ context : resource ,
101
98
},
102
99
{
103
- name : "default source.address attribute no geo metadata found by providers" ,
104
- goldenDir : "source_address_geo_not_found" ,
105
- context : resource ,
106
- lookupAttributes : defaultResourceAttributes ,
100
+ name : "default source.address attribute no geo metadata found by providers" ,
101
+ goldenDir : "source_address_geo_not_found" ,
102
+ context : resource ,
107
103
},
108
104
{
109
- name : "default source.ip attribute with an unspecified IP address should be skipped" ,
110
- goldenDir : "unspecified_address" ,
111
- context : resource ,
112
- lookupAttributes : defaultResourceAttributes ,
105
+ name : "default source.ip attribute with an unspecified IP address should be skipped" ,
106
+ goldenDir : "unspecified_address" ,
107
+ context : resource ,
113
108
},
114
109
{
115
- name : "custom source attributes" ,
116
- goldenDir : "custom_sources" ,
117
- context : resource ,
118
- lookupAttributes : []attribute.Key {"ip" , "host.ip" },
110
+ name : "custom source attributes" ,
111
+ goldenDir : "custom_sources" ,
112
+ context : resource ,
119
113
},
120
114
{
121
- name : "do not add resource attributes with an invalid ip" ,
122
- goldenDir : "invalid_address" ,
123
- context : resource ,
124
- lookupAttributes : defaultResourceAttributes ,
115
+ name : "do not add resource attributes with an invalid ip" ,
116
+ goldenDir : "invalid_address" ,
117
+ context : resource ,
125
118
},
126
119
{
127
- name : "source address located in inner attributes" ,
128
- goldenDir : "attribute_source_address" ,
129
- context : record ,
130
- lookupAttributes : defaultResourceAttributes ,
120
+ name : "source address located in inner attributes" ,
121
+ goldenDir : "attribute_source_address" ,
122
+ context : record ,
131
123
},
132
124
}
133
125
0 commit comments