Changeset 3833
- Timestamp:
- 27/07/10 19:17:59 (2 years ago)
- Files:
-
- trunk/node/t/munin_node_spoolreader.t (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/node/t/munin_node_spoolreader.t
r3831 r3833 3 3 use strict; 4 4 5 use Test::More tests => 18;5 use Test::More tests => 20; 6 6 use Test::LongString; 7 7 … … 139 139 ]); 140 140 141 is($reader->fetch(1234567800), <<EOS, 'Several plugins to fetch'); 141 ok(my $fetched = $reader->fetch(1234567800), 'Several services to fetch'); 142 143 my $f1 = <<EOT; 144 timestamp 1234567890 145 multigraph fnord 146 graph_title CPU usage 147 system.label system 148 system.value 3 149 EOT 150 my $f2 = <<EOT; 142 151 timestamp 1234567910 143 152 multigraph blort … … 145 154 slab.label slab 146 155 slab.value 123 147 timestamp 1234567890 148 multigraph fnord 149 graph_title CPU usage 150 system.label system 151 system.value 3 152 EOS 156 EOT 157 like($fetched, qr(\A$f1$f2|$f2$f1\Z)m, 'Got results for both services, in either order, and nothing else'); 158 153 159 154 160 is($reader->fetch(1234567900), <<EOS, 'Several plugins to fetch, but only one is recent enough'); … … 179 185 ]); 180 186 181 is($reader->fetch(1234567800), <<EOS, 'Several plugins to fetch'); 187 ok(my $fetched = $reader->fetch(1234567800), 'Several sets of results to fetch'); 188 189 my $f1 = <<EOT; 190 timestamp 1234567890 191 multigraph fnord 192 graph_title CPU usage 193 system.label system 194 system.value 3 195 EOT 196 my $f2 = <<EOT; 182 197 timestamp 1234567990 183 198 multigraph fnord … … 185 200 system.label system 186 201 system.value 4 187 timestamp 1234567890 188 multigraph fnord 189 graph_title CPU usage 190 system.label system 191 system.value 3 192 EOS 193 202 EOT 203 like($fetched, qr(\A$f1$f2|$f2$f1\Z)m, 'Got results for both services, in either order, and nothing else'); 194 204 } 195 205
