cmd_snapshot_test.go TestSnapSnaphotsTest is unreliable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Fix Released
|
High
|
Paweł Stołowski |
Bug Description
I experienced a failure in the TestSnapSnaphot
https:/
... and the relevant excerpt is:
FAIL: cmd_snapshot_
Test: restore x
Test: saved --id=x
Test: saved --id=3
cmd_
... value string = "" +
... "Set Snap Age Version Rev Size Notes\n" +
... "3 htop 83d10h 2 1168 1B auto\n"
... regex string = "" +
... "Set Snap Age Version Rev Size Notes\n" +
... "3 htop .* 2 1168 1B auto\n"
Test: saved
cmd_
... value string = "" +
... "Set Snap Age Version Rev Size Notes\n" +
... "1 htop 83d10h 2 1168 1B -\n"
... regex string = "" +
... "Set Snap Age Version Rev Size Notes\n" +
... "1 htop .* 2 1168 1B -\n"
Test: forget x
Test: check-snapshot x
Test: restore 1
Test: forget 2
Test: forget 2 snap1 snap2
Test: check-snapshot 4
Test: check-snapshot 4 snap1 snap2
In short, the column widths in the output are dependent on the data, but the regular expression it matches against expects one particular width.
In this case, the initial independent run of the unit tests (https:/
When I reran the CI for my branch, the failure went away.
Changed in snapd: | |
assignee: | nobody → Paweł Stołowski (stolowski) |
Changed in snapd: | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in snapd: | |
status: | Confirmed → Fix Committed |
Fix: https:/ /github. com/snapcore/ snapd/pull/ 6982