Skip to content

Commit 66ecadc

Browse files
committed
added missing err check to scanner and new section logs integration test
1 parent 9aba32f commit 66ecadc

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pkg/minikube/logs/logs.go

+3
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ func outputLastStart() error {
214214
for s.Scan() {
215215
out.Step(style.Empty, s.Text())
216216
}
217+
if err := s.Err(); err != nil {
218+
return fmt.Errorf("failed to read file %s: %v", fp, err)
219+
}
217220
return nil
218221
}
219222

test/integration/functional_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ func validateLogsCmd(ctx context.Context, t *testing.T, profile string) {
768768
if err != nil {
769769
t.Errorf("%s failed: %v", rr.Command(), err)
770770
}
771-
expectedWords := []string{"apiserver", "Linux", "kubelet"}
771+
expectedWords := []string{"apiserver", "Linux", "kubelet", "Last Start"}
772772
switch ContainerRuntime() {
773773
case "docker":
774774
expectedWords = append(expectedWords, "Docker")

0 commit comments

Comments
 (0)