diff --git a/.github/workflows/native-tests.yml b/.github/workflows/native-tests.yml index 7b7898896..a099aaafc 100644 --- a/.github/workflows/native-tests.yml +++ b/.github/workflows/native-tests.yml @@ -19,5 +19,4 @@ jobs: sha256: 96f6f1f416d868b78addd22746eefc7f4bf7820c6a3afa392a9f653f708c1644 working_directory: .mise/envs/native - name: Run native tests - working-directory: .mise/envs/native - run: mise native-test + run: mise //.mise/envs/native:native-test diff --git a/.mise/envs/native/mise.toml b/.mise/envs/native/mise.toml index 594ec3d80..b64367044 100644 --- a/.mise/envs/native/mise.toml +++ b/.mise/envs/native/mise.toml @@ -2,6 +2,9 @@ java = "oracle-graalvm-25.0.1" [tasks.native-test] -depends = "build" -run = "../../mvnw test -PnativeTest" -dir = "../../../integration-tests/it-spring-boot-smoke-test" +depends = "//:build" +# Native Test uses Surefire, so explicitly select the Failsafe-named test class. +run = ''' +cd "$MISE_MONOREPO_ROOT/integration-tests/it-spring-boot-smoke-test" +"$MISE_MONOREPO_ROOT/mvnw" test -PnativeTest -Dtest=ApplicationIT +''' diff --git a/integration-tests/it-spring-boot-smoke-test/pom.xml b/integration-tests/it-spring-boot-smoke-test/pom.xml index e27ae713e..6c0f92357 100644 --- a/integration-tests/it-spring-boot-smoke-test/pom.xml +++ b/integration-tests/it-spring-boot-smoke-test/pom.xml @@ -91,6 +91,19 @@ org.springframework.boot spring-boot-maven-plugin + + + org.apache.maven.plugins + maven-failsafe-plugin + + + + integration-test + verify + + + + diff --git a/integration-tests/it-spring-boot-smoke-test/src/test/java/io/prometheus/metrics/it/springboot/ApplicationTest.java b/integration-tests/it-spring-boot-smoke-test/src/test/java/io/prometheus/metrics/it/springboot/ApplicationIT.java similarity index 92% rename from integration-tests/it-spring-boot-smoke-test/src/test/java/io/prometheus/metrics/it/springboot/ApplicationTest.java rename to integration-tests/it-spring-boot-smoke-test/src/test/java/io/prometheus/metrics/it/springboot/ApplicationIT.java index c56634624..43f389482 100644 --- a/integration-tests/it-spring-boot-smoke-test/src/test/java/io/prometheus/metrics/it/springboot/ApplicationTest.java +++ b/integration-tests/it-spring-boot-smoke-test/src/test/java/io/prometheus/metrics/it/springboot/ApplicationIT.java @@ -17,7 +17,13 @@ import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) -class ApplicationTest { +class ApplicationIT { + @Test + void testUsesShadedProtobufRuntime() { + assertThat(Metrics.MetricFamily.class.getSuperclass().getName()) + .startsWith("io.prometheus.metrics.shaded.com_google_protobuf_"); + } + @Test void testPrometheusProtobufFormat() throws IOException { ExporterTest.Response response = diff --git a/mise.toml b/mise.toml index 021e0921c..698fc7ec3 100644 --- a/mise.toml +++ b/mise.toml @@ -1,3 +1,8 @@ +monorepo_root = true + +[monorepo] +config_roots = [".mise/envs/*"] + [tools] "aqua:grafana/gcx" = "v1.1.0" "aqua:grafana/oats" = "0.10.0"