test(gopher): assert orphan metadata is cleaned up
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user