distribution/xfer: improve test reporting

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-07-03 18:57:00 +02:00
parent 291872e086
commit 7d18f65eb2

View File

@@ -304,11 +304,11 @@ func TestSuccessfulDownload(t *testing.T) {
descriptor := d.(*mockDownloadDescriptor)
if descriptor.diffID != "" {
if receivedProgress[d.ID()].Action != "Already exists" {
t.Fatalf("did not get 'Already exists' message for %v", d.ID())
if actual := receivedProgress[d.ID()].Action; actual != "Already exists" {
t.Fatalf("did not get 'Already exists' message for %v: got: %s", d.ID(), actual)
}
} else if receivedProgress[d.ID()].Action != "Pull complete" {
t.Fatalf("did not get 'Pull complete' message for %v", d.ID())
} else if actual := receivedProgress[d.ID()].Action; actual != "Pull complete" {
t.Fatalf("did not get 'Pull complete' message for %v: got: %s", d.ID(), actual)
}
if rootFS.DiffIDs[i] != descriptor.expectedDiffID {