fix(depot): include asset path in invalid-sha error
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user