Merge pull request #117136 from claudiubelu/unittest-kubelet-server-journal-boot

unittests: Fixes server journal unit test on Windows
This commit is contained in:
Kubernetes Prow Robot 2023-05-03 12:02:20 -07:00 committed by GitHub
commit 59caf65fff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,7 +189,8 @@ func Test_nodeLogQuery_validate(t *testing.T) {
{name: "until", Services: []string{service1}, options: options{UntilTime: &until}},
{name: "since until", Services: []string{service1}, options: options{SinceTime: &until, UntilTime: &since},
wantErr: true},
{name: "boot", Services: []string{service1}, options: options{Boot: intPtr(-1)}},
// boot is not supported on Windows.
{name: "boot", Services: []string{service1}, options: options{Boot: intPtr(-1)}, wantErr: runtime.GOOS == "windows"},
{name: "boot out of range", Services: []string{service1}, options: options{Boot: intPtr(1)}, wantErr: true},
{name: "tailLines", Services: []string{service1}, options: options{TailLines: intPtr(100)}},
{name: "tailLines out of range", Services: []string{service1}, options: options{TailLines: intPtr(100000)}},