-
Notifications
You must be signed in to change notification settings - Fork 333
Expand file tree
/
Copy pathInstrumentationCheckerTest.java
More file actions
41 lines (27 loc) · 1.03 KB
/
InstrumentationCheckerTest.java
File metadata and controls
41 lines (27 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.datadoghq.trace.agent;
import com.datadoghq.trace.agent.InstrumentationChecker;
import com.datadoghq.trace.resolver.FactoryUtils;
import org.junit.Before;
import org.junit.Test;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
public class InstrumentationCheckerTest {
@Before
public void setup() {
Map<String, List<Map<String, String>>> rules = FactoryUtils.loadConfigFromResource("supported-version-test.yaml", Map.class);
Map<String, String> frameworks = new HashMap<String, String>() {{
put("artifact-1", "1.2.3.1232");
put("artifact-2", "4.y.z");
put("artifact-3", "5.123-1");
}};
new InstrumentationChecker(rules, frameworks);
}
@Test
public void testRules() throws Exception {
List<String> rules = InstrumentationChecker.getUnsupportedRules();
assertThat(rules.size()).isEqualTo(3);
assertThat(rules).containsExactlyInAnyOrder("unsupportedRuleOne", "unsupportedRuleTwo", "unsupportedRuleThree");
}
}