Fix version match re to handle 2019.09.12.1

This commit is contained in:
Mattias Wadman
2019-09-22 23:08:53 +02:00
parent 6cb64a90a7
commit 181d7b2a30

View File

@ -45,7 +45,7 @@ func TestBinaryNotPath(t *testing.T) {
func TestVersion(t *testing.T) {
defer leakChecks(t)()
versionRe := regexp.MustCompile(`^\d{4}\.\d{2}.\d{2}$`)
versionRe := regexp.MustCompile(`^\d{4}\.\d{2}.\d{2}.*$`)
version, versionErr := Version(context.Background())
if versionErr != nil {
@ -53,7 +53,7 @@ func TestVersion(t *testing.T) {
}
if !versionRe.MatchString(version) {
t.Errorf("version %q does match %q", version, versionRe)
t.Errorf("version %q does not match %q", version, versionRe)
}
}