chore: update node LTS versions

This commit is contained in:
Lucas Costi 2024-06-04 13:54:13 +10:00 committed by Jan De Dobbeleer
parent 92c42bb852
commit acc884ccbd
2 changed files with 12 additions and 12 deletions

View file

@ -90,9 +90,9 @@ func (n *Node) matchesVersionFile() (string, bool) {
case "gallium":
fileVersion = "16.20.2"
case "hydrogen":
fileVersion = "18.19.1"
fileVersion = "18.20.3"
case "iron":
fileVersion = "20.11.1"
fileVersion = "20.14.0"
}
}

View file

@ -11,10 +11,10 @@ import (
func TestNodeMatchesVersionFile(t *testing.T) {
nodeVersion := version{
Full: "20.11.1",
Full: "20.14.0",
Major: "20",
Minor: "11",
Patch: "1",
Minor: "14",
Patch: "0",
}
cases := []struct {
Case string
@ -23,16 +23,16 @@ func TestNodeMatchesVersionFile(t *testing.T) {
RCVersion string
}{
{Case: "no file context", Expected: true, RCVersion: ""},
{Case: "version match", Expected: true, ExpectedVersion: "20.11.1", RCVersion: "20.11.1"},
{Case: "version match with newline", Expected: true, ExpectedVersion: "20.11.1", RCVersion: "20.11.1\n"},
{Case: "version match", Expected: true, ExpectedVersion: "20.14.0", RCVersion: "20.14.0"},
{Case: "version match with newline", Expected: true, ExpectedVersion: "20.14.0", RCVersion: "20.14.0\n"},
{Case: "version mismatch", Expected: false, ExpectedVersion: "3.2.1", RCVersion: "3.2.1"},
{Case: "version match in other format", Expected: true, ExpectedVersion: "20.11.1", RCVersion: "v20.11.1"},
{Case: "version match without patch", Expected: true, ExpectedVersion: "20.11", RCVersion: "20.11"},
{Case: "version match without patch in other format", Expected: true, ExpectedVersion: "20.11", RCVersion: "v20.11"},
{Case: "version match in other format", Expected: true, ExpectedVersion: "20.14.0", RCVersion: "v20.14.0"},
{Case: "version match without patch", Expected: true, ExpectedVersion: "20.14", RCVersion: "20.14"},
{Case: "version match without patch in other format", Expected: true, ExpectedVersion: "20.14", RCVersion: "v20.14"},
{Case: "version match without minor", Expected: true, ExpectedVersion: "20", RCVersion: "20"},
{Case: "version match without minor in other format", Expected: true, ExpectedVersion: "20", RCVersion: "v20"},
{Case: "lts match", Expected: true, ExpectedVersion: "20.11.1", RCVersion: "lts/iron"},
{Case: "lts match upper case", Expected: true, ExpectedVersion: "20.11.1", RCVersion: "lts/Iron"},
{Case: "lts match", Expected: true, ExpectedVersion: "20.14.0", RCVersion: "lts/iron"},
{Case: "lts match upper case", Expected: true, ExpectedVersion: "20.14.0", RCVersion: "lts/Iron"},
{Case: "lts mismatch", Expected: false, ExpectedVersion: "8.17.0", RCVersion: "lts/carbon"},
}