mirror of
https://github.com/clearlinux/mixer-tools.git
synced 2026-09-06 21:51:30 +00:00
swupd: accept Manifests with "contentsize: 0"
Manifest.MoMs currently are produced with "contentsize: 0", e.g. https://download.clearlinux.org/update/20010/Manifest.MoM. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:
committed by
tmarcu
parent
ea2e2a1c05
commit
b3cc6a108d
@@ -142,10 +142,6 @@ func (m *Manifest) CheckHeaderIsValid() error {
|
||||
return errors.New("manifest has a zero file count")
|
||||
}
|
||||
|
||||
if m.Header.ContentSize == 0 {
|
||||
return errors.New("manifest has zero contentsize")
|
||||
}
|
||||
|
||||
if m.Header.TimeStamp.IsZero() {
|
||||
return errors.New("manifest timestamp not set")
|
||||
}
|
||||
|
||||
@@ -216,7 +216,6 @@ func TestCheckInvalidManifestHeaders(t *testing.T) {
|
||||
{"version zero", ManifestHeader{10, 0, 90, 553, time.Unix(1000, 0), 100000, nil}},
|
||||
{"no files", ManifestHeader{10, 100, 90, 0, time.Unix(1000, 0), 100000, nil}},
|
||||
{"no timestamp", ManifestHeader{10, 100, 90, 553, zeroTime, 100000, nil}},
|
||||
{"zero contentsize", ManifestHeader{10, 100, 90, 553, time.Unix(1000, 0), 0, nil}},
|
||||
{"version smaller than previous", ManifestHeader{10, 100, 110, 553, time.Unix(1000, 0), 100000, nil}},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user