Skip to content

Commit

Permalink
[#3588] Support disabling OCSP integration tests
Browse files Browse the repository at this point in the history
Added support for "noDocker" Maven property for disabling OCSP
integration tests based on Testcontainers when Docker is not available.
  • Loading branch information
sophokles73 committed Apr 2, 2024
1 parent 7dcf993 commit 07767c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.junit.jupiter.api.extension.ExtendWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.output.Slf4jLogConsumer;
import org.testcontainers.containers.wait.strategy.Wait;
import org.testcontainers.images.builder.ImageFromDockerfile;
import org.testcontainers.junit.jupiter.Testcontainers;

import io.vertx.core.Vertx;
import io.vertx.core.net.SelfSignedCertificate;
Expand All @@ -52,7 +52,7 @@
* tested against running instance of OCSP responder which is set up using openssl tool running in Testcontainers.
*
*/
@Testcontainers
@DisabledIfSystemProperty(named = "hono.skipDockerTests", matches = "true")
@ExtendWith(VertxExtension.class)
class OCSPIntegrationTest {
private static final Logger LOG = LoggerFactory.getLogger(OCSPIntegrationTest.class);
Expand All @@ -75,7 +75,7 @@ class OCSPIntegrationTest {
/**
* Load certificates from file system and initialize OCSP responder container.
*/
@SuppressWarnings({"rawtypes", "unchecked"})
@SuppressWarnings({"rawtypes", "unchecked", "resource"})
@BeforeAll
static void setUpAll() {
validCertificate = loadCertificate("target/certs/device-4711-cert.pem");
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@
<systemPropertyVariables>
<!-- use Base64 encoder/decoder that is compatible with vert.x 3 -->
<vertx.json.base64>legacy</vertx.json.base64>
<hono.skipDockerTests>${skipDockerTests}</hono.skipDockerTests>
</systemPropertyVariables>
<properties>
<configurationParameters>
Expand Down

0 comments on commit 07767c9

Please sign in to comment.