From 4876a78ab5e737a49aafc8af351041264dea8199 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sun, 28 Aug 2016 10:41:01 +0200 Subject: [PATCH] Remove unnecessary imports from unit test config refs #12575 --- lib/db_ido/db_ido-itl.conf | 4 ++-- test/config/2742.conf | 1 - test/config/5926.conf | 1 - test/config/5927.conf | 2 -- test/config/6479.conf | 2 -- test/config/6968.conf | 3 +-- test/config/8063.conf | 2 -- test/config/templates.conf | 3 +-- test/livestatus-test.cpp | 3 +-- 9 files changed, 5 insertions(+), 16 deletions(-) diff --git a/lib/db_ido/db_ido-itl.conf b/lib/db_ido/db_ido-itl.conf index 78febcfff..f7382cb3d 100644 --- a/lib/db_ido/db_ido-itl.conf +++ b/lib/db_ido/db_ido-itl.conf @@ -20,11 +20,11 @@ System.assert(Internal.run_with_activation_context(function() { var _Internal = Internal.clone() - template CheckCommand "ido-check-command" { + template CheckCommand "ido-check-command" use (_Internal) { execute = _Internal.IdoCheck } - object CheckCommand "ido" use (_Internal) { + object CheckCommand "ido" { import "ido-check-command" } })) diff --git a/test/config/2742.conf b/test/config/2742.conf index 501295cb6..555e71456 100644 --- a/test/config/2742.conf +++ b/test/config/2742.conf @@ -1,6 +1,5 @@ object CheckCommand "2742-macro-command" { - import "plugin-check-command" command = "echo UPTIME: $icinga.uptime$ SERVICES warn: $icinga.num_services_warning$ crit: $icinga.num_services_critical$ unknown: $icinga.num_services_unknown$ ackd: $icinga.num_services_acknowledged$ HOST: down: $icinga.num_hosts_down$ unreachable: $icinga.num_hosts_unreachable$" } diff --git a/test/config/5926.conf b/test/config/5926.conf index 141e0432e..e4060a683 100644 --- a/test/config/5926.conf +++ b/test/config/5926.conf @@ -1,7 +1,6 @@ object CheckCommand "5926-macro-test" { - import "plugin-check-command" command = "echo \"address: $address$ address_service: $service.vars.address$ foo: $foo$ keks: $keks$ god: $god$\"" //command = "echo \"address: $address$ address_service: $service.vars.address$\"" } diff --git a/test/config/5927.conf b/test/config/5927.conf index c584a1105..b7041b6c2 100644 --- a/test/config/5927.conf +++ b/test/config/5927.conf @@ -1,11 +1,9 @@ object EventCommand "5927-handle" { - import "plugin-event-command" command = "echo \"event handler triggered.\"" } object NotificationCommand "5927-notification" { - import "plugin-notification-command" command = "echo \"notification triggered.\"" } diff --git a/test/config/6479.conf b/test/config/6479.conf index 787f20d17..68b08a3c5 100644 --- a/test/config/6479.conf +++ b/test/config/6479.conf @@ -1,11 +1,9 @@ object EventCommand "6479-handle" { - import "plugin-event-command" command = "echo \"event handler triggered.\"" } object NotificationCommand "6479-notification" { - import "plugin-notification-command" command = "echo \"notification triggered.\"" } diff --git a/test/config/6968.conf b/test/config/6968.conf index 170eea6bc..988272799 100644 --- a/test/config/6968.conf +++ b/test/config/6968.conf @@ -12,9 +12,8 @@ object Service "6968-test" { } object CheckCommand "6968-check_vmware" { - import "plugin-check-command" - command = [ PluginDir + "/check_vmware.pl" ] + arguments = { "--server" = "$address$" "--username" = "***" diff --git a/test/config/8063.conf b/test/config/8063.conf index 991372c46..75676d1ea 100644 --- a/test/config/8063.conf +++ b/test/config/8063.conf @@ -1,6 +1,4 @@ object CheckCommand "8063-my-disk" { - import "plugin-check-command" - command = [ PluginDir + "/check_disk" ] arguments = { diff --git a/test/config/templates.conf b/test/config/templates.conf index 7fb27abcb..4a15bb801 100644 --- a/test/config/templates.conf +++ b/test/config/templates.conf @@ -65,9 +65,8 @@ object UserGroup "test-icingaadmins" { /* timeperiods */ object TimePeriod "test-24x7" { - import "legacy-timeperiod" - display_name = "Test Icinga 2 24x7 TimePeriod" + ranges = { "monday" = "00:00-24:00" "tuesday" = "00:00-24:00" diff --git a/test/livestatus-test.cpp b/test/livestatus-test.cpp index 61d88eeb0..18aa93207 100644 --- a/test/livestatus-test.cpp +++ b/test/livestatus-test.cpp @@ -53,7 +53,6 @@ struct LivestatusFixture { String config = R"CONFIG( object CheckCommand "dummy" { - import "plugin-check-command" command = "/bin/echo" } @@ -67,7 +66,7 @@ object Host "test-02" { check_command = "dummy" } -apply Service "livestatus"{ +apply Service "livestatus" { check_command = "dummy" notes = "test livestatus" assign where match("test-*", host.name)