mcchunkie/errata_test.go

24 lines
413 B
Go
Raw Permalink Normal View History

package main
import (
"testing"
)
func TestParseErrata(t *testing.T) {
2020-05-14 07:22:25 -06:00
got, err := ParseRemoteErrata("http://ftp.openbsd.org/pub/OpenBSD/patches/6.7/common/")
if err != nil {
t.Error(err)
}
2020-02-24 18:05:00 -07:00
l := len(got.List)
2020-03-29 15:42:12 -06:00
if l < 1 {
t.Errorf("errata count %d; want > 1", l)
}
erratum := got.List[len(got.List)-1]
err = erratum.Fetch()
if err != nil {
t.Errorf("can't fetch data for erratum\n%s", err)
}
}