Add new test for multi-line YAML strings

This commit is contained in:
Ian Fijolek
2020-01-07 10:28:14 -08:00
parent f6ccd9a3bd
commit 0269ad3512
5 changed files with 91 additions and 12 deletions
+4 -3
View File
@@ -1,9 +1,10 @@
---
check_interval: 1
monitors:
- name: Command
command: ['echo', '$PATH']
alert_down: [ 'log_command', 'log_shell' ]
alert_down: ['log_command', 'log_shell']
alert_every: 0
- name: Shell
command_shell: >
@@ -11,12 +12,12 @@ monitors:
echo 'another line';
echo $PATH;
exit 1
alert_down: [ 'log_command', 'log_shell' ]
alert_down: ['log_command', 'log_shell']
alert_after: 5
alert_every: 0
alerts:
log_command:
command: [ 'echo', 'regular', '"command!!!"', "{{.MonitorName}}" ]
command: ['echo', 'regular', '"command!!!"', "{{.MonitorName}}"]
log_shell:
command_shell: echo "Failure on {{.MonitorName}} User is $USER"
+18
View File
@@ -0,0 +1,18 @@
---
check_interval: 1
monitors:
- name: Shell
command_shell: >
echo 'Some string with stuff';
echo '<angle brackets>';
exit 1
alert_down: ['log_shell']
alert_after: 1
alert_every: 0
alerts:
log_shell:
command_shell: |
echo 'Some string with stuff'
echo '<angle brackets>'