Skip to content

Commit

Permalink
feat(debian): support Debian 11(bullseye) (#1298)
Browse files Browse the repository at this point in the history
* feat(debian): support bullseye

* fix(debian): fix test case
  • Loading branch information
MaineK00n committed Sep 8, 2021
1 parent 3e67f04 commit 9ed5f2c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/os.go
Expand Up @@ -110,6 +110,7 @@ func GetEOL(family, release string) (eol EOL, found bool) {
"8": {Ended: true},
"9": {StandardSupportUntil: time.Date(2022, 6, 30, 23, 59, 59, 0, time.UTC)},
"10": {StandardSupportUntil: time.Date(2024, 6, 30, 23, 59, 59, 0, time.UTC)},
"11": {StandardSupportUntil: time.Date(2026, 6, 30, 23, 59, 59, 0, time.UTC)},
}[major(release)]
case constant.Raspbian:
// Not found
Expand Down
8 changes: 8 additions & 0 deletions config/os_test.go
Expand Up @@ -290,6 +290,14 @@ func TestEOL_IsStandardSupportEnded(t *testing.T) {
now: time.Date(2021, 1, 6, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "Debian 12 is not supported yet",
fields: fields{family: Debian, release: "12"},
now: time.Date(2021, 1, 6, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: false,
},
//alpine
Expand Down
1 change: 1 addition & 0 deletions gost/debian.go
Expand Up @@ -31,6 +31,7 @@ func (deb Debian) supported(major string) bool {
"8": "jessie",
"9": "stretch",
"10": "buster",
"11": "bullseye",
}[major]
return ok
}
Expand Down
9 changes: 8 additions & 1 deletion gost/debian_test.go
Expand Up @@ -39,10 +39,17 @@ func TestDebian_Supported(t *testing.T) {
want: true,
},
{
name: "11 is not supported yet",
name: "11 is supported",
args: args{
major: "11",
},
want: true,
},
{
name: "12 is not supported yet",
args: args{
major: "12",
},
want: false,
},
{
Expand Down

0 comments on commit 9ed5f2c

Please sign in to comment.