Changeset 3846

Show
Ignore:
Timestamp:
07/28/10 19:08:03 (2 years ago)
Author:
ligne
Message:

remove test code that's no longer needed.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/node/t/munin_node_proxyspooler.t

    r3823 r3846  
    33use strict; 
    44 
    5 use Test::More tests => 33
     5use Test::More tests => 32
    66use Test::Differences; 
    77use Test::Deep; 
     
    185185### _get_service_list 
    186186SKIP: { 
    187     skip 'Set MUNIN_HOST and MUNIN_PORT environment variables to the hostname and port of a node to test against', 3 
    188         unless $host and $port; 
    189  
    190     my $spooler = Munin::Node::ProxySpooler->new( 
    191         host => $host, 
    192         port => $port, 
    193     ) or next; 
    194  
    195     $spooler->_open_node_connection; 
    196  
    197     my @nodes = $spooler->_get_node_list; 
    198  
    199     my @services = $spooler->_get_service_list($nodes[0]); 
     187    skip 'Set MUNIN_HOST and MUNIN_PORT environment variables to the hostname and port of a node to test against', 2 
     188        unless $host and $port; 
     189 
     190    my $spooler = Munin::Node::ProxySpooler->new( 
     191        host => $host, 
     192        port => $port, 
     193    ) or next; 
     194 
     195    $spooler->_open_node_connection; 
     196 
     197    my @services = $spooler->_get_service_list(); 
    200198    ok(\@services, 'Got a list of services from the node') or next; 
    201199 
    202200    cmp_deeply(\@services, array_each(re('^[-\w.:]+$')), 'all the services look reasonable'); 
    203  
    204     ############### 
    205  
    206     @services = $spooler->_get_service_list('fnord.example.com'); 
    207     is(scalar(@services), 0, 'No services for an unknown node') or next; 
    208201} 
    209202 
     
    219212    ) or next; 
    220213 
    221     my $intervals = $spooler->_get_intervals or next; 
     214    my $intervals = $spooler->_get_intervals() or next; 
    222215 
    223216    cmp_deeply([ keys   %$intervals ], array_each(re('^[-\w.:]+$')), 'all the keys look like services'); 
     
    234227    local *Munin::Node::ProxySpooler::_close_node_connection = sub {}; 
    235228 
    236     local *Munin::Node::ProxySpooler::_get_node_list = sub { 'test.example.com' }; 
    237229    local *Munin::Node::ProxySpooler::_get_service_list = sub { 'fnord' }; 
    238230    use warnings;