1
0
mirror of https://github.com/juanfont/headscale.git synced 2025-11-10 01:20:58 +01:00
juanfont.headscale/hscontrol/capver/capver_test.go
Kristoffer Dalby 54d24d5dcb
capver: generate
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2025-10-24 11:57:19 +02:00

30 lines
783 B
Go

package capver
import (
"testing"
"github.com/google/go-cmp/cmp"
)
func TestTailscaleLatestMajorMinor(t *testing.T) {
for _, test := range tailscaleLatestMajorMinorTests {
t.Run("", func(t *testing.T) {
output := TailscaleLatestMajorMinor(test.n, test.stripV)
if diff := cmp.Diff(output, test.expected); diff != "" {
t.Errorf("TailscaleLatestMajorMinor(%d, %v) mismatch (-want +got):\n%s", test.n, test.stripV, diff)
}
})
}
}
func TestCapVerMinimumTailscaleVersion(t *testing.T) {
for _, test := range capVerMinimumTailscaleVersionTests {
t.Run("", func(t *testing.T) {
output := TailscaleVersion(test.input)
if output != test.expected {
t.Errorf("CapVerFromTailscaleVersion(%d) = %s; want %s", test.input, output, test.expected)
}
})
}
}