mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 18:15:42 +01:00
Downgrade error to info in directory hash fetching
This commit is contained in:
parent
fc404e499c
commit
a3d6d6acfb
2 changed files with 10 additions and 5 deletions
|
|
@ -776,8 +776,13 @@ func (p *processor) integrity(
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if res.StatusCode != http.StatusOK {
|
if res.StatusCode != http.StatusOK {
|
||||||
|
if f.IsDirectory() {
|
||||||
|
p.badIntegrities.info("Fetching %s failed: Status code %d (%s)",
|
||||||
|
hashFile, res.StatusCode, res.Status)
|
||||||
|
} else {
|
||||||
p.badIntegrities.error("Fetching %s failed: Status code %d (%s)",
|
p.badIntegrities.error("Fetching %s failed: Status code %d (%s)",
|
||||||
hashFile, res.StatusCode, res.Status)
|
hashFile, res.StatusCode, res.Status)
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
h, err := func() ([]byte, error) {
|
h, err := func() ([]byte, error) {
|
||||||
|
|
|
||||||
|
|
@ -146,9 +146,9 @@ func TestShaMarking(t *testing.T) {
|
||||||
EnableSha512: test.enableSha512,
|
EnableSha512: test.enableSha512,
|
||||||
},
|
},
|
||||||
test.directoryProvider)
|
test.directoryProvider)
|
||||||
for i, want := range report.Domains[0].Requirements {
|
for i, got := range report.Domains[0].Requirements {
|
||||||
if !reflect.DeepEqual(expected[i], *want) {
|
if !reflect.DeepEqual(expected[i], *got) {
|
||||||
t.Errorf("SHA marking %v: Expected %v, got %v", test.name, *want, expected[i])
|
t.Errorf("SHA marking %v: Expected %v, got %v", test.name, expected[i], *got)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue