summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authoremartin <ephraim.martin@est.tech>2019-04-23 14:49:01 +0000
committeremartin <ephraim.martin@est.tech>2019-04-23 14:49:01 +0000
commitd5f3810292e6c85d123de7aa28fa0c860a21c183 (patch)
tree917dee3f70477c64e545ff84482d4a42236e6758 /src/test
parentea5f0af6c28863b5f8ee220e105b6c3221c68b03 (diff)
Fix minor bugs in ves publisher1.0.0
* Publisher now uses existing RequestID * Introduce basicAuth for publisher * Clean up ves string by removing new lines * Update pm-mapper topic name in blueprint * Update reconfigure script to use https Change-Id: Ib743127b04077b063c73415b1475be83e200ec3b Issue-ID: DCAEGEN2-1444 Signed-off-by: emartin <ephraim.martin@est.tech>
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/onap/dcaegen2/pmmapper/messagerouter/VESPublisherTest.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/java/org/onap/dcaegen2/pmmapper/messagerouter/VESPublisherTest.java b/src/test/java/org/onap/dcaegen2/pmmapper/messagerouter/VESPublisherTest.java
index 69d34f8..2244d2d 100644
--- a/src/test/java/org/onap/dcaegen2/pmmapper/messagerouter/VESPublisherTest.java
+++ b/src/test/java/org/onap/dcaegen2/pmmapper/messagerouter/VESPublisherTest.java
@@ -67,7 +67,7 @@ public class VESPublisherTest {
Flux<Event> flux = sut.publish(events);
- verify(sender, times(3)).send(Mockito.anyString(),Mockito.anyString(), Mockito.anyString());
+ verify(sender, times(3)).send(Mockito.anyString(),Mockito.anyString(), Mockito.anyString(), Mockito.anyString());
StepVerifier.create(flux)
.expectNextMatches(event::equals)
.expectComplete()
@@ -79,11 +79,12 @@ public class VESPublisherTest {
Event event = mock(Event.class);
List<Event> events = Arrays.asList(event,event,event);
when(event.getVes()).thenReturn(ves);
- when(sender.send("POST",topicURL,ves)).thenThrow(Exception.class);
+ when(sender.send("POST",topicURL,ves,"base64encoded")).thenThrow(Exception.class);
Flux<Event> flux = sut.publish(events);
StepVerifier.create(flux)
+ .expectNext(events.get(0))
.verifyComplete();
}
}