Skip to content

Commit

Permalink
Added script
Browse files Browse the repository at this point in the history
  • Loading branch information
jamtur01 committed Aug 28, 2018
1 parent 360789e commit 80d1003
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ jdk:
- oraclejdk8

before_script:
- git clone https://github.com/riemann/riemann.git
- cd riemann
- lein deps
- sudo lein run &
- cd ..
- scripts/run_riemann_server.sh
- sleep 30

cache:
directories:
Expand Down
42 changes: 42 additions & 0 deletions scripts/run_riemann_server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

git clone https://github.com/riemann/riemann.git
cd riemann
lein deps

cat << EOF > ./riemann.config
; -*- mode: clojure; -*-
; vim: filetype=clojure
(logging/init {:file "riemann.log"})
(tcp-server {:tls? false
:key "test/data/tls/server.pkcs8"
:cert "test/data/tls/server.crt"
:ca-cert "test/data/tls/demoCA/cacert.pem"})
(instrumentation {:interval 1})
(udp-server)
(ws-server)
(graphite-server)
(periodically-expire 1)
(let [index (tap :index (index))]
(streams
(default :ttl 3
(expired #(prn "Expired" %))
(where (not (service #"^riemann "))
index))))
(tests
(deftest index-test
(is (= (inject! [{:service "test"
:time 1}])
{:index [{:service "test"
:time 1
:ttl 3}]}))))
EOF

nohup lein run -- ./riemann.config &
cd ..

0 comments on commit 80d1003

Please sign in to comment.