fix(depot): include asset path in invalid-sha error

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-04 23:34:52 +02:00
co-authored by Claude Fable 5
parent b8502700ea
commit f1ff144740
2 changed files with 9 additions and 14 deletions
+4 -3
View File
@@ -111,10 +111,11 @@ func TestReferencedSHAs(t *testing.T) {
_, err = ReferencedSHAs(tmpdir)
if err == nil {
t.Errorf("ReferencedSHAs with bad sha: got nil error, want error naming file")
t.Fatalf("ReferencedSHAs with bad sha: got nil error, want error naming file and asset path")
}
if err != nil && err.Error() != "badsha.yml: invalid sha256 hash" {
t.Errorf("ReferencedSHAs error message: got %q, should mention badsha.yml", err.Error())
want := `badsha.yml: asset "file5.txt": invalid sha256 "not_a_valid_sha"`
if err.Error() != want {
t.Errorf("ReferencedSHAs error message: got %q, want %q", err.Error(), want)
}
}