Skip to content

Commit dee6076

Browse files
committed
add test case for logcache with strange hostname characters
1 parent d8750be commit dee6076

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

t/scenarios/logfile_cache_http/backend/test.cfg

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,46 @@ define hostgroup {
1010
members *
1111
}
1212

13+
define host {
14+
host_name test
15+
alias localhost
16+
address 127.0.0.1
17+
use host-pnp,generic-host
18+
contact_groups example
19+
icon_image linux40.png
20+
}
21+
22+
define host {
23+
host_name test\abcde
24+
alias localhost
25+
address 127.0.0.1
26+
use host-pnp,generic-host
27+
contact_groups example
28+
icon_image linux40.png
29+
}
30+
31+
define host {
32+
host_name test\abc123
33+
alias localhost
34+
address 127.0.0.1
35+
use host-pnp,generic-host
36+
contact_groups example
37+
icon_image linux40.png
38+
}
39+
40+
define service {
41+
service_description Load
42+
host_name test,test\abcde,test\abc123
43+
use srv-pnp,generic-service
44+
check_command check_local_load!5,5,5!10,10,10
45+
contact_groups example
46+
}
47+
48+
define service {
49+
service_description Ping
50+
host_name test,test\abcde,test\abc123
51+
use srv-pnp,generic-service
52+
check_command check_ping!1000,20%!2000,30%
53+
contact_groups example
54+
}
55+

t/scenarios/logfile_cache_http/t/local/logcache.t

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ BEGIN {
88
import TestUtils;
99
}
1010

11-
plan tests => 162;
11+
plan tests => 166;
1212

1313
###########################################################
1414
# test thruks script path
@@ -147,3 +147,10 @@ TestUtils::test_page(
147147
);
148148

149149
###########################################################
150+
# selfcheck
151+
TestUtils::test_command({
152+
cmd => "/usr/bin/env thruk selfcheck",
153+
like => ['/no errors in 1 logcache/'],
154+
});
155+
156+
###########################################################

0 commit comments

Comments
 (0)