Changeset 3831

Show
Ignore:
Timestamp:
07/27/10 15:04:00 (1 month ago)
Author:
ligne
Message:

read-side of the change in r3828 (write out the timestamp at the start of each set of results, rather than munging the data).

Files:

Legend:

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

    r3808 r3831  
    5858 
    5959    is_string($reader->fetch(1234567899), <<EOS, 'Fetched data since the write'); 
    60 multigraph fnord 
    61 graph_title CPU usage 
    62 system.label system 
    63 system.value 1234567900:2 
    64 multigraph fnord 
    65 graph_title CPU usage 
    66 system.label system 
    67 system.value 1234567910:3 
     60timestamp 1234567900 
     61multigraph fnord 
     62graph_title CPU usage 
     63system.label system 
     64system.value 2 
     65timestamp 1234567910 
     66multigraph fnord 
     67graph_title CPU usage 
     68system.label system 
     69system.value 3 
    6870EOS 
    6971 
    7072    is_string($reader->fetch(1234567900), <<EOS, 'Start timestamp is not inclusive'); 
    71 multigraph fnord 
    72 graph_title CPU usage 
    73 system.label system 
    74 system.value 1234567910:3 
     73timestamp 1234567910 
     74multigraph fnord 
     75graph_title CPU usage 
     76system.label system 
     77system.value 3 
    7578EOS 
    7679 
    7780    is_string($reader->fetch(1), <<EOS, 'Timestamp predates all result: all results are returned'); 
    78 multigraph fnord 
    79 graph_title CPU usage 
    80 system.label system 
    81 system.value 1234567890:1 
    82 multigraph fnord 
    83 graph_title CPU usage 
    84 system.label system 
    85 system.value 1234567900:2 
    86 multigraph fnord 
    87 graph_title CPU usage 
    88 system.label system 
    89 system.value 1234567910:3 
     81timestamp 1234567890 
     82multigraph fnord 
     83graph_title CPU usage 
     84system.label system 
     85system.value 1 
     86timestamp 1234567900 
     87multigraph fnord 
     88graph_title CPU usage 
     89system.label system 
     90system.value 2 
     91timestamp 1234567910 
     92multigraph fnord 
     93graph_title CPU usage 
     94system.label system 
     95system.value 3 
    9096EOS 
    9197 
     
    107113 
    108114    is_string($reader->fetch(1), <<EOS, 'Blank lines are ignored'); 
    109 multigraph fnord 
    110 graph_title CPU usage 
    111 system.label system 
    112 system.value 1234567890:1 
     115timestamp 1234567890 
     116multigraph fnord 
     117graph_title CPU usage 
     118system.label system 
     119system.value 1 
    113120EOS 
    114121 
     
    133140 
    134141    is($reader->fetch(1234567800), <<EOS, 'Several plugins to fetch'); 
     142timestamp 1234567910 
    135143multigraph blort 
    136144graph_title Memory usage 
    137145slab.label slab 
    138 slab.value 1234567910:123 
    139 multigraph fnord 
    140 graph_title CPU usage 
    141 system.label system 
    142 system.value 1234567890:3 
     146slab.value 123 
     147timestamp 1234567890 
     148multigraph fnord 
     149graph_title CPU usage 
     150system.label system 
     151system.value 3 
    143152EOS 
    144153 
    145154    is($reader->fetch(1234567900), <<EOS, 'Several plugins to fetch, but only one is recent enough'); 
     155timestamp 1234567910 
    146156multigraph blort 
    147157graph_title Memory usage 
    148158slab.label slab 
    149 slab.value 1234567910:123 
     159slab.value 123 
    150160EOS 
    151161 
     
    170180 
    171181    is($reader->fetch(1234567800), <<EOS, 'Several plugins to fetch'); 
     182timestamp 1234567990 
    172183multigraph fnord 
    173184graph_title CPU usage! 
    174185system.label system 
    175 system.value 1234567890:3 
    176 multigraph fnord 
    177 graph_title CPU usage! 
    178 system.label system 
    179 system.value 1234567990:4 
     186system.value 4 
     187timestamp 1234567890 
     188multigraph fnord 
     189graph_title CPU usage 
     190system.label system 
     191system.value 3 
    180192EOS 
    181193 
     
    229241 
    230242    is(Munin::Node::SpoolReader::_cat_file("$dir/blah"), "rubbish\n", 'Read contents of file'); 
    231      
     243 
    232244    is(Munin::Node::SpoolReader::_cat_file("$dir/absent"), undef, 'Missing file just returns undef'); 
    233245}