test(gopher): assert orphan metadata is cleaned up

This commit is contained in:
2026-06-30 11:32:09 +02:00
parent 9066acc325
commit d3b6451472
+6
View File
@@ -437,6 +437,12 @@ func TestGopherResumeStaleMetadata(t *testing.T) {
if string(data) != "Fresh\n" {
t.Errorf("content = %q, want %q", string(data), "Fresh\n")
}
// The orphan sidecar from a different URL must be removed once the
// successful fresh download completes — otherwise stale metadata
// could be picked up by a future --resume run.
if output.FileExists(outPath + output.ResumeMetaFileSuffix) {
t.Error("expected orphan .goget.meta to be deleted after fresh download")
}
}
// TestGopherResumeIgnoredWhenWriterSet verifies that --resume is silently