capver: generate
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
251e16d772
commit
e8753619de
3 changed files with 99 additions and 52 deletions
|
|
@ -9,9 +9,9 @@ var tailscaleLatestMajorMinorTests = []struct {
|
|||
stripV bool
|
||||
expected []string
|
||||
}{
|
||||
{3, false, []string{"v1.86", "v1.88", "v1.90"}},
|
||||
{2, true, []string{"1.88", "1.90"}},
|
||||
{9, true, []string{
|
||||
{3, false, []string{"v1.88", "v1.90", "v1.92"}},
|
||||
{2, true, []string{"1.90", "1.92"}},
|
||||
{10, true, []string{
|
||||
"1.74",
|
||||
"1.76",
|
||||
"1.78",
|
||||
|
|
@ -21,6 +21,7 @@ var tailscaleLatestMajorMinorTests = []struct {
|
|||
"1.86",
|
||||
"1.88",
|
||||
"1.90",
|
||||
"1.92",
|
||||
}},
|
||||
{0, false, nil},
|
||||
}
|
||||
|
|
@ -29,11 +30,11 @@ var capVerMinimumTailscaleVersionTests = []struct {
|
|||
input tailcfg.CapabilityVersion
|
||||
expected string
|
||||
}{
|
||||
{106, "v1.74.0"},
|
||||
{102, "v1.70.0"},
|
||||
{104, "v1.72.0"},
|
||||
{109, "v1.78.0"},
|
||||
{113, "v1.80.0"},
|
||||
{106, "v1.74"},
|
||||
{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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue