mirror of
https://github.com/juanfont/headscale.git
synced 2026-04-10 11:14:21 +02:00
go generate ./hscontrol/capver/... Adds v1.96 (capVer 133) to tailscaleToCapVer and capVerToTailscaleVer, rolls the 10-version support window forward so MinSupportedCapabilityVersion is now 109 (v1.78), and refreshes the test fixture accordingly.
41 lines
733 B
Go
41 lines
733 B
Go
package capver
|
|
|
|
// Generated DO NOT EDIT
|
|
|
|
import "tailscale.com/tailcfg"
|
|
|
|
var tailscaleLatestMajorMinorTests = []struct {
|
|
n int
|
|
stripV bool
|
|
expected []string
|
|
}{
|
|
{3, false, []string{"v1.92", "v1.94", "v1.96"}},
|
|
{2, true, []string{"1.94", "1.96"}},
|
|
{10, true, []string{
|
|
"1.78",
|
|
"1.80",
|
|
"1.82",
|
|
"1.84",
|
|
"1.86",
|
|
"1.88",
|
|
"1.90",
|
|
"1.92",
|
|
"1.94",
|
|
"1.96",
|
|
}},
|
|
{0, false, nil},
|
|
}
|
|
|
|
var capVerMinimumTailscaleVersionTests = []struct {
|
|
input tailcfg.CapabilityVersion
|
|
expected string
|
|
}{
|
|
{109, "v1.78"},
|
|
{32, "v1.24"},
|
|
{41, "v1.30"},
|
|
{46, "v1.32"},
|
|
{51, "v1.34"},
|
|
{9001, ""}, // Test case for a version higher than any in the map
|
|
{60, ""}, // Test case for a version lower than any in the map
|
|
}
|