Skip to content

Commit

Permalink
metaconfig/hnormalise: Add basic config test
Browse files Browse the repository at this point in the history
  • Loading branch information
James Adams committed Jul 20, 2023
1 parent 012a262 commit 6606423
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
object template config;

include 'metaconfig/hnormalise/config';

prefix "/software/components/metaconfig/services/{/etc/hnormalise.yaml}/contents";

"logging" = dict(
"frequency", 100000,
);

"input" = dict(
"zeromq", dict(
"method", "pull",
"host", "lo",
"port", 31338,
),
);

"output" = dict(
"zeromq", dict(
"success", dict(
"method", "push",
"host", "localhost",
"port", 27001,
),
"failure", dict(
"method", "push",
"host", "localhost",
"port", 27002,
),
),
);

"fields" = list(
list("@source_host", "hostname"),
list("message", "msg"),
list("syslog_version", "version"),
list("syslog_abspri", "pri"),
list("program", "app_name"),
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Base test for config
---
/etc/hnormalise.yaml
---
^fields:$
^- - '@source_host'$
^ - hostname$
^- - message$
^ - msg$
^- - syslog_version$
^ - version$
^- - syslog_abspri$
^ - pri$
^- - program$
^ - app_name$
^input:$
^ zeromq:$
^ host: lo$
^ method: pull$
^ port: 31338$
^logging:$
^ frequency: 100000$
^output:$
^ zeromq:$
^ failure:$
^ host: localhost$
^ method: push$
^ port: 27002$
^ success:$
^ host: localhost$
^ method: push$
^ port: 27001$

0 comments on commit 6606423

Please sign in to comment.