You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by al...@apache.org on 2020/11/04 12:16:55 UTC

[camel] branch master updated: camel-nagios: removed the simple frame test as the expected digest is sensible upon the camel context name

This is an automated email from the ASF dual-hosted git repository.

aldettinger pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 458a1b9  camel-nagios: removed the simple frame test as the expected digest is sensible upon the camel context name
458a1b9 is described below

commit 458a1b967b59ad8b35043c097d0037851250b123
Author: aldettinger <al...@gmail.com>
AuthorDate: Wed Nov 4 13:13:07 2020 +0100

    camel-nagios: removed the simple frame test as the expected digest is sensible upon the camel context name
---
 .../apache/camel/component/nagios/MockNscaServerBasedTest.java | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/components/camel-nagios/src/test/java/org/apache/camel/component/nagios/MockNscaServerBasedTest.java b/components/camel-nagios/src/test/java/org/apache/camel/component/nagios/MockNscaServerBasedTest.java
index 9b93492..cd3e048 100644
--- a/components/camel-nagios/src/test/java/org/apache/camel/component/nagios/MockNscaServerBasedTest.java
+++ b/components/camel-nagios/src/test/java/org/apache/camel/component/nagios/MockNscaServerBasedTest.java
@@ -45,8 +45,7 @@ public class MockNscaServerBasedTest extends CamelTestSupport {
     @BindToRegistry("mockNscaServer")
     protected static MockNscaServerInitializerFactory mockNscaServer = new MockNscaServerInitializerFactory();
 
-    private static final String EXPECTED_NSCA_SIMPLE_FRAME_DIGEST = "2ec8ecf15f363bf507b8e19f0118e3cb";
-    private static final String EXPECTED_NSCA_MULTI_HEADERS_FRAME_DIGEST = "315d4b1aed2bb2db79d516f7c651b0d1";
+    private static final String EXPECTED_NSCA_FRAME_DIGEST = "315d4b1aed2bb2db79d516f7c651b0d1";
     private static final int INIT_VECTOR_PLUS_TIMESTAMP_SIZE_IN_BYTES = 128 + Integer.BYTES;
 
     private int nscaPort;
@@ -58,16 +57,13 @@ public class MockNscaServerBasedTest extends CamelTestSupport {
     }
 
     @Test
-    public void sendSimpleThenMultiHeadersNscaFramesShouldSucceed() {
-        template.sendBody("direct:start", "Hello Nagios");
-        mockNscaServer.verifyFrameReceived(EXPECTED_NSCA_SIMPLE_FRAME_DIGEST);
-
+    public void sendFixedNscaFrameShouldReturnExpectedDigest() {
         Map<String, Object> headers = new HashMap<>();
         headers.put(NagiosConstants.LEVEL, "CRITICAL");
         headers.put(NagiosConstants.HOST_NAME, "myHost");
         headers.put(NagiosConstants.SERVICE_NAME, "myService");
         template.sendBodyAndHeaders("direct:start", "Hello Nagios", headers);
-        mockNscaServer.verifyFrameReceived(EXPECTED_NSCA_MULTI_HEADERS_FRAME_DIGEST);
+        mockNscaServer.verifyFrameReceived(EXPECTED_NSCA_FRAME_DIGEST);
     }
 
     @Override