Fix smoke tests to use new images (#1845)

This commit is contained in:
Nikita Salnikov-Tarnovski 2020-12-07 16:21:22 +02:00 committed by GitHub
parent 04217319ad
commit 6281583770
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -17,7 +17,7 @@ abstract class AppServerTest extends SmokeTest {
def "#appServer smoke test on JDK #jdk"(String appServer, int jdk) {
setup:
startTarget(jdk, appServer)
String url = "http://localhost:${target.getMappedPort(8080)}/greeting"
String url = "http://localhost:${target.getMappedPort(8080)}/app/greeting"
def request = new Request.Builder().url(url).get().build()
def currentAgentVersion = new JarFile(agentPath).getManifest().getMainAttributes().get(Attributes.Name.IMPLEMENTATION_VERSION)
@ -37,14 +37,14 @@ abstract class AppServerTest extends SmokeTest {
traces.countSpansByKind(Span.SpanKind.SPAN_KIND_SERVER) == 2
and: "Expected span names"
traces.countSpansByName('/greeting') == 1
traces.countSpansByName('/headers') == 1
traces.countSpansByName('/app/greeting') == 1
traces.countSpansByName('/app/headers') == 1
and: "The span for the initial web request"
traces.countFilteredAttributes("http.url", url) == 1
and: "Client and server spans for the remote call"
traces.countFilteredAttributes("http.url", "http://localhost:8080/headers") == 2
traces.countFilteredAttributes("http.url", "http://localhost:8080/app/headers") == 2
and: "Number of spans tagged with current otel library version"
traces.countFilteredResourceAttributes("telemetry.auto.version", currentAgentVersion) == 3

View File

@ -13,7 +13,7 @@ import org.testcontainers.containers.wait.strategy.WaitStrategy
class GlassFishSmokeTest extends AppServerTest {
protected String getTargetImage(int jdk, String serverVersion) {
"ghcr.io/open-telemetry/java-test-containers:payara-${serverVersion}-jdk$jdk"
"ghcr.io/open-telemetry/java-test-containers:payara-${serverVersion}-jdk$jdk-20201207.405832649"
}
@Override

View File

@ -11,13 +11,13 @@ import okhttp3.Request
class WildflySmokeTest extends AppServerTest {
protected String getTargetImage(int jdk, String serverVersion) {
"ghcr.io/open-telemetry/java-test-containers:wildfly-${serverVersion}-jdk$jdk"
"ghcr.io/open-telemetry/java-test-containers:wildfly-${serverVersion}-jdk$jdk-20201207.405832649"
}
def "JSP smoke test on WildFly"() {
setup:
startTarget(11, "21.0.0.Final")
String url = "http://localhost:${target.getMappedPort(8080)}/jsp"
String url = "http://localhost:${target.getMappedPort(8080)}/app/jsp"
def request = new Request.Builder().url(url).get().build()
when:
@ -31,7 +31,7 @@ class WildflySmokeTest extends AppServerTest {
traces.countSpansByKind(Span.SpanKind.SPAN_KIND_SERVER) == 1
traces.countSpansByName('/jsp') == 1
traces.countSpansByName('/app/jsp') == 1
}