aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap/dcae/common/publishing/PublisherTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/onap/dcae/common/publishing/PublisherTest.java')
-rw-r--r--src/test/java/org/onap/dcae/common/publishing/PublisherTest.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/test/java/org/onap/dcae/common/publishing/PublisherTest.java b/src/test/java/org/onap/dcae/common/publishing/PublisherTest.java
index f269b942..be768941 100644
--- a/src/test/java/org/onap/dcae/common/publishing/PublisherTest.java
+++ b/src/test/java/org/onap/dcae/common/publishing/PublisherTest.java
@@ -3,6 +3,7 @@
* VES Collector
* ================================================================================
* Copyright (C) 2021 Nokia. All rights reserved.
+ * Copyright (C) 2023 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +24,9 @@ import com.google.gson.JsonElement;
import io.vavr.collection.List;
import io.vavr.control.Option;
import org.junit.jupiter.api.Test;
+import org.junit.Assume;
+import org.junit.Before;
+
import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.model.ImmutableMessageRouterPublishResponse;
import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.model.MessageRouterPublishResponse;
import org.testcontainers.containers.DockerComposeContainer;
@@ -37,14 +41,20 @@ import static org.onap.dcae.common.publishing.DMaapContainer.createContainerInst
import static org.onap.dcae.common.publishing.DmaapRequestConfiguration.getAsJsonElements;
-@Testcontainers
-public class PublisherTest {
+@Testcontainers(disabledWithoutDocker = true)
+public class PublisherTest {
@Container
private final DockerComposeContainer CONTAINER = createContainerInstance();
+
+ @Before
+ public void linuxOnly() {
+ Assume.assumeFalse
+ (System.getProperty("os.name").toLowerCase().startsWith("win"));
+ }
@Test
- void publishEvent_shouldSuccessfullyPublishSingleMessage() {
+ public void publishEvent_shouldSuccessfullyPublishSingleMessage() {
//given
final Publisher publisher = new Publisher();
final String simpleEvent = "{\"message\":\"message1\"}";