From 03f9196b7f62fbd5b9af9d39c43638e01dfbfa23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20F=2E=20R=C3=B8dseth?= Date: Wed, 6 Nov 2024 17:23:10 +0100 Subject: [PATCH] Fix the major API version test --- api_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api_test.go b/api_test.go index 85c083dc..b125197b 100644 --- a/api_test.go +++ b/api_test.go @@ -3,6 +3,7 @@ package main import ( "fmt" + "strings" "testing" "github.com/xyproto/algernon/engine" @@ -47,8 +48,8 @@ func TestAPI(t *testing.T) { if err := New("simpleredis", simpleredis.Version, 2.6).Check(); err != nil { t.Error(err) } - if err := New("permissions2", permissions.Version, 2.6).Check(); err != nil { - t.Error(err) + if !strings.HasPrefix(permissions.VersionString, "1.") { + t.Error(fmt.Errorf("permissions is %q, requires %q", permissions.VersionString, "1.*")) } if err := New("pinterface", pinterface.Version, 5.3).Check(); err != nil { t.Error(err)