Prepare shared glossary documents
This commit is contained in:
@@ -217,6 +217,11 @@ func TestResolvePreparedGlossaryDocuments(t *testing.T) {
|
||||
if got.Path != file || got.Checksum != checksum || got.Size != int64(len(payload)) || !strings.Contains(got.RelativePath, "inputs/glossaries/") {
|
||||
t.Fatalf("identity: %+v", got)
|
||||
}
|
||||
m.Inputs[0].Size = int64(len(payload)) + 1
|
||||
if _, err := ResolvePreparedInput(paths, m, source); err == nil || !strings.Contains(err.Error(), "size mismatch") {
|
||||
t.Fatalf("incorrect declared size: %v", err)
|
||||
}
|
||||
m.Inputs[0].Size = 0
|
||||
if err := os.WriteFile(file, []byte("changed"), 0644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user