Skip to content

Commit 6ab4b6c

Browse files
committed
Add more test cases to StableConfigSourceTest to improve codecov
1 parent 85d11cf commit 6ab4b6c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

internal-api/src/test/groovy/datadog/trace/bootstrap/config/provider/StableConfigSourceTest.groovy

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,32 @@ class StableConfigSourceTest extends DDSpecification {
182182
'''apm_configuration_rules:
183183
- "not-a-map"
184184
''' | "Rule must be a map, but got: String"
185+
'''apm_configuration_rules:
186+
- selectors:
187+
- origin: process_arguments
188+
key: "-Dfoo"
189+
matches: "not-a-list"
190+
operator: equals
191+
configuration:
192+
DD_SERVICE: "test"
193+
''' | "'matches' must be a list, but got: String"
194+
'''apm_configuration_rules:
195+
- selectors:
196+
- origin: process_arguments
197+
key: "-Dfoo"
198+
matches: ["bar"]
199+
configuration:
200+
DD_SERVICE: "test"
201+
''' | "Missing 'operator' in selector"
202+
'''apm_configuration_rules:
203+
- selectors:
204+
- origin: process_arguments
205+
key: "-Dfoo"
206+
matches: ["bar"]
207+
operator: 12345
208+
configuration:
209+
DD_SERVICE: "test"
210+
''' | "'operator' must be a string, but got: Integer"
185211
}
186212

187213
// Corrupt YAML string variable used for testing, defined outside the 'where' block for readability

0 commit comments

Comments
 (0)