Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestLogFile/SetLogFile fails: open ~/.minikube/logs/audit.json: no such file or directory #10804

Closed
prezha opened this issue Mar 13, 2021 · 1 comment · Fixed by #10806
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Milestone

Comments

@prezha
Copy link
Contributor

prezha commented Mar 13, 2021

if ~/.minikube folder structure does not exist (incl. after minikube delete --all --purge), the test will fail:

--- FAIL: TestLogFile (0.00s)
    --- FAIL: TestLogFile/SetLogFile (0.00s)
        logFile_test.go:30: unable to open /home/prezha/.minikube/logs/audit.json: open /home/prezha/.minikube/logs/audit.json: no such file or directory
    --- FAIL: TestLogFile/AppendToLog (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xbec6fd]

goroutine 33 [running]:
testing.tRunner.func1.2(0xcb2d20, 0x13ec100)
        /usr/local/go/src/testing/testing.go:1144 +0x332
testing.tRunner.func1(0xc000583380)
        /usr/local/go/src/testing/testing.go:1147 +0x4b6
panic(0xcb2d20, 0x13ec100)
        /usr/local/go/src/runtime/panic.go:965 +0x1b9
k8s.io/minikube/pkg/minikube/audit.TestLogFile.func2(0xc000583380)
        /home/prezha/dev/k8s/minikube/github.com/prezha/minikube/pkg/minikube/audit/logFile_test.go:41 +0x15d
testing.tRunner(0xc000583380, 0xe2db30)
        /usr/local/go/src/testing/testing.go:1194 +0xef
created by testing.(*T).Run
        /usr/local/go/src/testing/testing.go:1239 +0x2b3
FAIL    k8s.io/minikube/pkg/minikube/audit      0.051s
@prezha
Copy link
Contributor Author

prezha commented Mar 13, 2021

/assign

@prezha prezha added this to the v.1.19.0 milestone Mar 14, 2021
@prezha prezha added kind/bug Categorizes issue or PR as related to a bug. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant