changeset 1177:a17b7932f949

minor
author Devel 2
date Tue, 16 Jun 2020 16:47:21 +0200
parents 8208e6d5ce24
children 650f353776c0
files stress-tester/src/test/java/com/passus/st/source/EventSourceConfiguratorTest.java stress-tester/src/test/resources/com/passus/st/config/test_job_config.yml
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/stress-tester/src/test/java/com/passus/st/source/EventSourceConfiguratorTest.java	Tue Jun 16 16:39:25 2020 +0200
+++ b/stress-tester/src/test/java/com/passus/st/source/EventSourceConfiguratorTest.java	Tue Jun 16 16:47:21 2020 +0200
@@ -27,11 +27,11 @@
     public void testConfigure() throws Exception {
         String configStr = "sources:\n" +
                 "   - type: pcap\n" +
-                "     fileName: /test.pcap\n" +
+                "     fileName: ./test.pcap\n" +
                 "     loops: 2\n" +
                 "     loopDelay: 3\n" +
                 "   - type: nc\n" +
-                "     fileName: /test.nc\n" +
+                "     fileName: ./test.nc\n" +
                 "     loops: 4\n";
         /*        "          sessionProc:\n" +
                 "              tcp:\n" +
@@ -58,12 +58,12 @@
         assertEquals(2, sources.size());
 
         PcapSessionEventSource pcapEventSource = (PcapSessionEventSource) sources.get(0);
-        assertEquals(new File(context.getRootDir(), "/test.pcap").toString(), pcapEventSource.getPcapFile());
+        assertEquals(new File(context.getRootDir(), "./test.pcap").getAbsolutePath(), pcapEventSource.getPcapFile());
         assertEquals(2, pcapEventSource.getLoops());
         assertEquals(3, pcapEventSource.getLoopDelay());
 
         NcEventSource ncEventSource = (NcEventSource) sources.get(1);
-        assertEquals(new File(context.getRootDir(), "/test.nc").toString(), ncEventSource.getNcFile());
+        assertEquals(new File(context.getRootDir(), "./test.nc").getAbsolutePath(), ncEventSource.getNcFile());
         assertEquals(4, ncEventSource.getLoops());
     }
 }
\ No newline at end of file
--- a/stress-tester/src/test/resources/com/passus/st/config/test_job_config.yml	Tue Jun 16 16:39:25 2020 +0200
+++ b/stress-tester/src/test/resources/com/passus/st/config/test_job_config.yml	Tue Jun 16 16:47:21 2020 +0200
@@ -19,7 +19,7 @@
     active: true
     destinations:
         - type: file
-          fileName: /file
+          fileName: ./file
           active: true
 
 emitter:
@@ -32,11 +32,11 @@
 eventSource:
     sources:
         - type: pcap
-          fileName: /test.pcap
+          fileName: ./test.pcap
           loops: 1
 
         - type: nc
-          fileName: /test.nc
+          fileName: ./test.nc
           loops: 1
 
 client: