Skip to content

Commit

Permalink
tests to assert service name - cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobat committed Aug 4, 2023
1 parent 04ead57 commit b3fc8b5
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
package io.quarkus.opentelemetry.deployment;

import static org.hamcrest.Matchers.is;
import static org.junit.jupiter.api.Assertions.assertEquals;

import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.jupiter.api.extension.RegisterExtension;

import io.quarkus.opentelemetry.deployment.common.TestSpanExporter;
import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider;
import io.quarkus.test.QuarkusUnitTest;

public class OpenTelemetryServiceNameAppNameTest extends OpenTelemetryServiceNameBaseTest{
public class OpenTelemetryServiceNameAppNameTest extends OpenTelemetryServiceNameBaseTest {

@RegisterExtension
static final QuarkusUnitTest TEST = new QuarkusUnitTest().setArchiveProducer(
() -> ShrinkWrap.create(JavaArchive.class)
.addClass(TestSpanExporter.class)
.addClass(TestSpanExporterProvider.class))
.overrideRuntimeConfigKey("quarkus.application.name", SERVICE_NAME);
() -> ShrinkWrap.create(JavaArchive.class)
.addClass(TestSpanExporter.class)
.addClass(TestSpanExporterProvider.class)
.addAsResource(new StringAsset("" +
"quarkus.otel.bsp.schedule.delay=50\n" +
"quarkus.application.name=" + SERVICE_NAME + "\n"), "application.properties"));
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package io.quarkus.opentelemetry.deployment;

import io.quarkus.opentelemetry.deployment.common.TestSpanExporter;
import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider;
import io.quarkus.test.QuarkusUnitTest;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.jupiter.api.extension.RegisterExtension;

import io.quarkus.opentelemetry.deployment.common.TestSpanExporter;
import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider;
import io.quarkus.test.QuarkusUnitTest;

public class OpenTelemetryServiceNameCombinedResourceWinsTest extends OpenTelemetryServiceNameBaseTest {

@RegisterExtension
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package io.quarkus.opentelemetry.deployment;

import io.quarkus.opentelemetry.deployment.common.TestSpanExporter;
import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider;
import io.quarkus.test.QuarkusUnitTest;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.jupiter.api.extension.RegisterExtension;

import io.quarkus.opentelemetry.deployment.common.TestSpanExporter;
import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider;
import io.quarkus.test.QuarkusUnitTest;

public class OpenTelemetryServiceNameCombinedServiceWinsTest extends OpenTelemetryServiceNameBaseTest {

@RegisterExtension
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package io.quarkus.opentelemetry.deployment;

import static org.hamcrest.Matchers.is;
import static org.junit.jupiter.api.Assertions.assertEquals;

import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.jupiter.api.extension.RegisterExtension;
Expand All @@ -11,7 +8,7 @@
import io.quarkus.opentelemetry.deployment.common.TestSpanExporterProvider;
import io.quarkus.test.QuarkusUnitTest;

public class OpenTelemetryServiceNameNoResourceAttrsTest extends OpenTelemetryServiceNameBaseTest{
public class OpenTelemetryServiceNameNoResourceAttrsTest extends OpenTelemetryServiceNameBaseTest {

@RegisterExtension
static final QuarkusUnitTest TEST = new QuarkusUnitTest().setArchiveProducer(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.quarkus.opentelemetry.deployment;

import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.jupiter.api.extension.RegisterExtension;

Expand Down

0 comments on commit b3fc8b5

Please sign in to comment.