From 7d18f65eb25096e22e7b31344f78bc713ce7beea Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 3 Jul 2025 18:57:00 +0200 Subject: [PATCH] distribution/xfer: improve test reporting Signed-off-by: Sebastiaan van Stijn --- distribution/xfer/download_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/distribution/xfer/download_test.go b/distribution/xfer/download_test.go index 85ae310b2f..b45749bf49 100644 --- a/distribution/xfer/download_test.go +++ b/distribution/xfer/download_test.go @@ -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 {