# Copyright (c) 2005-2006 bivio Software, Inc. All rights reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: HTTPPing.bunit,v 1.2 2006/07/28 23:55:34 nagler Exp $ Request('initialize_fully'); config({ class() => my $cfg = {map( ($_ . '_file' => tmp_dir() . "/$_"), qw(status loadavg), )}, }); [ class() => [ page => [ ['http://www.bivio.biz/hm/contact'] => [''], ['http://www.bivio.biz'] => [''], ['http://www.bivio.biz/not-found'] => qr/\b404\b/, ], { method => 'process_status', compute_params => sub { my(undef, $params) = @_; write_file($cfg->{loadavg_file}, "2 3 $params->[0].3"); return []; }, } => [ 1 => '', 2 => '', 3 => '', 4 => qr{4}, 5 => qr{5}, 1 => qr{1}, 2 => '', ], ], ];