[icinga-checkins] icinga.org: icinga-core/test/cgis: tests: update #2291 with user macro test refs #2291

git at icinga.org git at icinga.org
Sat Oct 27 15:36:31 CEST 2012


Module: icinga-core
Branch: test/cgis
Commit: d5f9efdfefe20e68e49259b93405c08957d6c64d
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=d5f9efdfefe20e68e49259b93405c08957d6c64d

Author: Michael Friedrich <michael.friedrich at gmail.com>
Date:   Mon Oct  8 15:28:14 2012 +0200

tests: update #2291 with user macro test refs #2291

---

 tests/etc/2291.cfg |   15 +++++++++++++++
 tests/resource.cfg |   14 ++++++++++++++
 2 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/tests/etc/2291.cfg b/tests/etc/2291.cfg
index 484942f..c344977 100644
--- a/tests/etc/2291.cfg
+++ b/tests/etc/2291.cfg
@@ -4,6 +4,7 @@
 #
 # #2291
 # non existant macros are not replaced, and misleading to single dollar signs
+# requires resource.ccfg entry with $USER5$=password$foo$
 #############################################################################################
 
 
@@ -40,6 +41,12 @@ define command{
         command_line                    $USER1$/check_procs -w $ARG1$ -c $ARG2$ -C $UNKNOWSERVICENMACRO1$
 }
 
+define command{
+        command_name                    2291macro_test3
+        command_line                    $USER1$/check_procs -w $ARG1$ -c $ARG2$ -C '$USER5$'
+}
+
+
 define service {
 	name                           	2291default-servicecheck
 	register                       	0
@@ -62,3 +69,11 @@ define service {
 	name                            2291Macro Test
 	service_description             2291Macro Test
 }
+
+define service {
+        use                             2291default-servicecheck
+        host_name                       2291localhost
+        name                            2291UserMacro Test
+        service_description             2291UserMacro Test
+	check_command                   2291macro_test3!5!10
+}
diff --git a/tests/resource.cfg b/tests/resource.cfg
new file mode 100644
index 0000000..ab565ba
--- /dev/null
+++ b/tests/resource.cfg
@@ -0,0 +1,14 @@
+###########################################################################
+# RESOURCE.CFG
+###########################################################################
+
+# Sets $USER1$ to be the path to the plugins
+$USER1$=/usr/lib/nagios/plugins
+
+# 2879
+#$USER16$=
+#$USER17$= 
+
+
+#2291
+$USER5$=password$foo$





More information about the icinga-checkins mailing list