File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
src/testConfigFile/java/io/opentelemetry/javaagent/tooling/config Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,14 @@ testing {
113113 compileOnly(" com.google.code.findbugs:annotations" )
114114 }
115115 }
116+
117+ val testConfigFile by registering(JvmTestSuite ::class ) {
118+ dependencies {
119+ implementation(project(" :javaagent-tooling" ))
120+ // requires mockito-inline
121+ implementation(" uk.org.webcompere:system-stubs-jupiter" )
122+ }
123+ }
116124 }
117125}
118126
Original file line number Diff line number Diff line change 1414import java .nio .charset .StandardCharsets ;
1515import java .nio .file .Files ;
1616import java .util .Map ;
17- import org .junit .Rule ;
18- import org .junit .contrib .java .lang .system .EnvironmentVariables ;
1917import org .junit .jupiter .api .Test ;
18+ import org .junit .jupiter .api .extension .ExtendWith ;
2019import org .junit .jupiter .api .io .TempDir ;
2120import org .junitpioneer .jupiter .ClearSystemProperty ;
21+ import uk .org .webcompere .systemstubs .environment .EnvironmentVariables ;
22+ import uk .org .webcompere .systemstubs .jupiter .SystemStub ;
23+ import uk .org .webcompere .systemstubs .jupiter .SystemStubsExtension ;
2224
25+ @ ExtendWith (SystemStubsExtension .class )
2326@ ClearSystemProperty (key = "otel.javaagent.configuration-file" )
2427class ConfigurationFileTest {
2528
2629 @ TempDir File tmpDir ;
2730
28- @ Rule public EnvironmentVariables environmentVariables = new EnvironmentVariables ();
31+ @ SystemStub private EnvironmentVariables environmentVariables ;
32+
33+ // @SystemStub private SystemProperties systemProperties;
2934
3035 @ Test
3136 void shouldUseEnvVar () throws IOException {
You can’t perform that action at this time.
0 commit comments