OtelSpringStarterDisabledSmokeTest.java 918 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright The OpenTelemetry Authors
  3. * SPDX-License-Identifier: Apache-2.0
  4. */
  5. package io.opentelemetry.smoketest;
  6. import io.opentelemetry.spring.smoketest.OtelSpringStarterSmokeTestApplication;
  7. import org.junit.jupiter.api.Test;
  8. import org.junit.jupiter.api.condition.DisabledInNativeImage;
  9. import org.springframework.boot.test.context.SpringBootTest;
  10. @SpringBootTest(
  11. classes = {
  12. OtelSpringStarterSmokeTestApplication.class,
  13. OtelSpringStarterSmokeTest.TestConfiguration.class
  14. },
  15. properties = {"otel.sdk.disabled=true"})
  16. @DisabledInNativeImage // Without this the native tests in the OtelSpringStarterSmokeTest class will
  17. // fail with org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "TEST_TABLE"
  18. // already exists
  19. class OtelSpringStarterDisabledSmokeTest {
  20. @Test
  21. void shouldStartApplication() {
  22. // make sure we can still start the application with the disabled property
  23. }
  24. }