cockpit-project / cockpit-machines

Cockpit UI for virtual machines
GNU Lesser General Public License v2.1
257 stars 67 forks source link

test: Ensure stable snapshot sorting #1689

Closed mvollmer closed 2 weeks ago

mvollmer commented 2 weeks ago

Snapshots are sorted by creation time, and then by name. The test expects "test_snap_des" to be in the first row, which it normally is since it is created last. But if it is created in the same second as "test_snap_1", then it will be in the second row because its name is sorted after "test_snap_1".

Let's fix that by naming it "test_snap_0". Then it is always in the first row, even when the creation times are equal.