Changeset 3831
- Timestamp:
- 07/27/10 15:04:00 (1 month 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
r3808 r3831 58 58 59 59 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 60 timestamp 1234567900 61 multigraph fnord 62 graph_title CPU usage 63 system.label system 64 system.value 2 65 timestamp 1234567910 66 multigraph fnord 67 graph_title CPU usage 68 system.label system 69 system.value 3 68 70 EOS 69 71 70 72 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 73 timestamp 1234567910 74 multigraph fnord 75 graph_title CPU usage 76 system.label system 77 system.value 3 75 78 EOS 76 79 77 80 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 81 timestamp 1234567890 82 multigraph fnord 83 graph_title CPU usage 84 system.label system 85 system.value 1 86 timestamp 1234567900 87 multigraph fnord 88 graph_title CPU usage 89 system.label system 90 system.value 2 91 timestamp 1234567910 92 multigraph fnord 93 graph_title CPU usage 94 system.label system 95 system.value 3 90 96 EOS 91 97 … … 107 113 108 114 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 115 timestamp 1234567890 116 multigraph fnord 117 graph_title CPU usage 118 system.label system 119 system.value 1 113 120 EOS 114 121 … … 133 140 134 141 is($reader->fetch(1234567800), <<EOS, 'Several plugins to fetch'); 142 timestamp 1234567910 135 143 multigraph blort 136 144 graph_title Memory usage 137 145 slab.label slab 138 slab.value 1234567910:123 139 multigraph fnord 140 graph_title CPU usage 141 system.label system 142 system.value 1234567890:3 146 slab.value 123 147 timestamp 1234567890 148 multigraph fnord 149 graph_title CPU usage 150 system.label system 151 system.value 3 143 152 EOS 144 153 145 154 is($reader->fetch(1234567900), <<EOS, 'Several plugins to fetch, but only one is recent enough'); 155 timestamp 1234567910 146 156 multigraph blort 147 157 graph_title Memory usage 148 158 slab.label slab 149 slab.value 123 4567910:123159 slab.value 123 150 160 EOS 151 161 … … 170 180 171 181 is($reader->fetch(1234567800), <<EOS, 'Several plugins to fetch'); 182 timestamp 1234567990 172 183 multigraph fnord 173 184 graph_title CPU usage! 174 185 system.label system 175 system.value 1234567890:3 176 multigraph fnord 177 graph_title CPU usage! 178 system.label system 179 system.value 1234567990:4 186 system.value 4 187 timestamp 1234567890 188 multigraph fnord 189 graph_title CPU usage 190 system.label system 191 system.value 3 180 192 EOS 181 193 … … 229 241 230 242 is(Munin::Node::SpoolReader::_cat_file("$dir/blah"), "rubbish\n", 'Read contents of file'); 231 243 232 244 is(Munin::Node::SpoolReader::_cat_file("$dir/absent"), undef, 'Missing file just returns undef'); 233 245 }
