Skip to content

Commit

Permalink
fix external-annotation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Rzeszutek committed Jul 5, 2022
1 parent 6fe6a5e commit 7cdc80a
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import io.opentelemetry.instrumentation.api.config.Config
import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig
import io.opentelemetry.javaagent.instrumentation.extannotations.ExternalAnnotationInstrumentation
import spock.lang.Specification
import spock.lang.Unroll
Expand All @@ -15,14 +15,8 @@ class IncludeTest extends Specification {
@Unroll
def "test configuration #value"() {
setup:
Config config
if (value) {
config = Config.builder().addProperties([
"otel.instrumentation.external-annotations.include": value
]).build()
} else {
config = Config.builder().build()
}
InstrumentationConfig config = Mock()
config.getString("otel.instrumentation.external-annotations.include") >> value

expect:
ExternalAnnotationInstrumentation.configureAdditionalTraceAnnotations(config) == expected.toSet()
Expand Down

0 comments on commit 7cdc80a

Please sign in to comment.