Commit aafeafd
committed
test: pin CountUsers against the user list in every device-count mode
CountUsers keeps its own copy of the device clause and had drifted from the one
that enforces — it honoured neither the count mode nor the grace, so the
dashboard's "active" total disagreed with the list rendered beside it. That was
fixed in 6fa0043 with nothing pinning it.
Getting the test to fail for the right reason took two tries. Setting the mode
before stamping leaves device_over_since at zero, and the "device_over_since = 0"
term then admits the user on its own — so a clause with the mode term removed
still passed. The mode is now set after the stamp, reproducing the real state an
operator passes through when they switch to hwid: a row still carrying an armed
stamp under a mode that does not enforce it.
The second account, over the limit but still inside the grace, is what pins the
grace term; without it a clause that cuts immediately reads the same as one that
waits. Both halves verified by breaking the corresponding term and watching the
test fail.1 parent d4f4a11 commit aafeafd
1 file changed
Lines changed: 62 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
0 commit comments