From ef03c6637bca5bbd0cd28cb0fab4acde9d5105a7 Mon Sep 17 00:00:00 2001
From: Sergey Yakubov <sergey.yakubov@desy.de>
Date: Wed, 31 Jul 2019 16:09:26 +0200
Subject: [PATCH] updated nomad tests

---
 ...r.nomad.in => asapo-test_filemon.nomad.in} |   2 +-
 .../asapo-test_filemon_batch.nomad.in         | 127 ++++++++++++++++++
 2 files changed, 128 insertions(+), 1 deletion(-)
 rename tests/manual/tests_via_nomad/{asapo-test_filemon_producer_toreceiver.nomad.in => asapo-test_filemon.nomad.in} (98%)
 create mode 100644 tests/manual/tests_via_nomad/asapo-test_filemon_batch.nomad.in

diff --git a/tests/manual/tests_via_nomad/asapo-test_filemon_producer_toreceiver.nomad.in b/tests/manual/tests_via_nomad/asapo-test_filemon.nomad.in
similarity index 98%
rename from tests/manual/tests_via_nomad/asapo-test_filemon_producer_toreceiver.nomad.in
rename to tests/manual/tests_via_nomad/asapo-test_filemon.nomad.in
index b9c374bcd..5e69201b5 100644
--- a/tests/manual/tests_via_nomad/asapo-test_filemon_producer_toreceiver.nomad.in
+++ b/tests/manual/tests_via_nomad/asapo-test_filemon.nomad.in
@@ -1,4 +1,4 @@
-job "asapo-filemon-producer" {
+job "asapo-filemon" {
   datacenters = [
     "dc1"]
 
diff --git a/tests/manual/tests_via_nomad/asapo-test_filemon_batch.nomad.in b/tests/manual/tests_via_nomad/asapo-test_filemon_batch.nomad.in
new file mode 100644
index 000000000..37df9e4d8
--- /dev/null
+++ b/tests/manual/tests_via_nomad/asapo-test_filemon_batch.nomad.in
@@ -0,0 +1,127 @@
+job "asapo-filemon" {
+  datacenters = [
+    "dc1"]
+
+  type = "batch"
+
+  group "producer-windows" {
+
+    constraint {
+      attribute = "${attr.kernel.name}"
+      value = "windows"
+    }
+
+    count = 1
+    task "producer" {
+      driver = "raw_exec"
+
+      config {
+        command = "local/asapo-eventmon-producer.exe"
+        args = [
+          "local/test.json"]
+      }
+
+      artifact {
+        source = "http://nims.desy.de/extra/asapo/asapo-eventmon-producer-@ASAPO_VERSION@.exe"
+        mode = "file"
+        destination = "local/asapo-eventmon-producer.exe"
+      }
+
+      template {
+        data = <<EOH
+{
+ "AsapoEndpoint":"psana002:8400",
+ "Tag":"test_tag",
+ "BeamtimeID":"asapo_test1",
+ "Mode":"tcp",
+ "NThreads":8,
+ "LogLevel":"debug",
+ "RootMonitoredFolder":"u:\\asapo",
+ "MonitoredSubFolders":["test_folder"],
+ "IgnoreExtentions":["tmp"],
+ "RemoveAfterSend":true,
+ "Subset": {
+  	"Mode":"batch",
+  	"BatchSize": {{ keyOrDefault "monitor_batch_size" "3" }}
+ }
+}
+        EOH
+        destination = "local/test.json"
+      }
+      #      resources {
+      #        cpu = 5000
+      #        memory = 128
+      #        network {
+      #          mbits = 10000
+      #        }
+    } # producer task
+  }
+  #windows
+
+  group "producer-linux" {
+
+    constraint {
+      attribute = "${attr.kernel.name}"
+      value = "linux"
+    }
+
+    constraint {
+      attribute = "${meta.location}"
+      value = "petra3"
+    }
+
+    count = 1
+
+    task "producer" {
+      driver = "raw_exec"
+
+      config {
+        command = "local/asapo-eventmon-producer"
+        args = [
+          "local/test.json"]
+      }
+
+      artifact {
+        source = "http://nims.desy.de/extra/asapo/asapo-eventmon-producer-@ASAPO_VERSION@"
+        mode = "file"
+        destination = "local/asapo-eventmon-producer"
+      }
+
+      template {
+        data = <<EOH
+{
+ "AsapoEndpoint":"psana002:8400",
+ "Tag":"test_tag",
+ "BeamtimeID":"asapo_test2",
+ "Mode":"tcp",
+ "NThreads":8,
+ "LogLevel":"debug",
+ "RootMonitoredFolder":"/run/user",
+ "MonitoredSubFolders":["data"],
+ "IgnoreExtentions":["tmp"],
+ "RemoveAfterSend":true,
+ "Subset": {
+  	"Mode":"batch",
+  	"BatchSize": {{ keyOrDefault "monitor_batch_size" "3" }}
+ }
+
+}
+        EOH
+        destination = "local/test.json"
+      }
+
+      #      resources {
+      #        cpu = 5000
+      #        memory = 128
+      #        network {
+      #          mbits = 10000
+      #        }
+      #      }
+
+    } # task producer
+  }
+  #linux
+}
+
+
+
-- 
GitLab