-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix using custom variables starting with multiple underlines
- Loading branch information
Showing
4 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
t/scenarios/backend_naemon/t/local/020-custom_vars_filter.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
use warnings; | ||
use strict; | ||
use Test::More; | ||
|
||
BEGIN { | ||
use lib('t'); | ||
require TestUtils; | ||
import TestUtils; | ||
} | ||
|
||
plan tests => 27; | ||
|
||
$ENV{'THRUK_TEST_AUTH'} = 'omdadmin:omd'; | ||
$ENV{'PLACK_TEST_EXTERNALSERVER_URI'} = 'http://127.0.0.1/demo'; | ||
|
||
use_ok("Thruk::Utils::IO"); | ||
|
||
########################################################### | ||
# verify that we use the correct thruk binary | ||
TestUtils::test_command({ | ||
cmd => '/bin/bash -c "type thruk"', | ||
like => ['/\/thruk\/script\/thruk/'], | ||
}) or BAIL_OUT("wrong thruk path"); | ||
|
||
########################################################### | ||
TestUtils::test_page( | ||
url => '/thruk/cgi-bin/status.cgi?style=hostdetail&dfl_s0_type=custom variable&dfl_s0_val_pre=TEST&dfl_s0_op=%3D&dfl_s0_value=test var hst', | ||
like => ['host=test'], | ||
); | ||
|
||
TestUtils::test_page( | ||
url => '/thruk/cgi-bin/status.cgi?style=hostdetail&dfl_s0_type=custom variable&dfl_s0_val_pre=_IMPACT&dfl_s0_op=%3D&dfl_s0_value=dbl underscore hst', | ||
like => ['host=test'], | ||
); | ||
|
||
########################################################### |