mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-16 15:20:17 +00:00
util: add test case for WSL kernel version parsing
This commit is contained in:
parent
4bb434501d
commit
7fcaaa5585
@ -46,6 +46,13 @@ func TestGetVersion(t *testing.T) {
|
||||
},
|
||||
expected: version.MajorMinor(5, 4),
|
||||
},
|
||||
{
|
||||
name: "valid microsoft WSL2 kernel version",
|
||||
readFileFunc: func(_ string) ([]byte, error) {
|
||||
return []byte("5.15.146.1-microsoft-standard-WSL2"), nil
|
||||
},
|
||||
expected: version.MajorMinor(5, 15).WithPatch(146),
|
||||
},
|
||||
{
|
||||
name: "failed to read os-release file",
|
||||
readFileFunc: func(_ string) ([]byte, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user