Describe the bug
error in lint and unit test from PR #1095
make lint gets the following error:
INFO [runner] linters took 24.048004155s with stages: goanalysis_metalinter: 24.039978211s
pkg/base/linuxutils/lsblk/lsblk.go:163:68: unnecessary leading newline (whitespace)
make test error:
=== RUN TestLSBLK_SearchDrivePath_Success
--- FAIL: TestLSBLK_SearchDrivePath_Success (0.00s)
panic:
assert: mock: I don't know what to return because the method call was unexpected.
Either do Mock.On("RunCmd").Return(...) first, or remove the RunCmd() call.
This method was unexpected:
RunCmd(string)
0: "lsblk --paths --json --bytes --fs --output NAME,TYPE,SIZE,ROTA,SERIAL,WWN,VENDOR,MODEL,REV,MOUNTPOINT,FSTYPE,PARTUUID"
at: [executors.go:181 lsblk.go:133 lsblk.go:166 lsblk_test.go:92] [recovered]
panic:
assert: mock: I don't know what to return because the method call was unexpected.
Either do Mock.On("RunCmd").Return(...) first, or remove the RunCmd() call.
This method was unexpected:
RunCmd(string)
0: "lsblk --paths --json --bytes --fs --output NAME,TYPE,SIZE,ROTA,SERIAL,WWN,VENDOR,MODEL,REV,MOUNTPOINT,FSTYPE,PARTUUID"
at: [executors.go:181 lsblk.go:133 lsblk.go:166 lsblk_test.go:92]
Environment (please complete the following information):
Hardware: [e.g. Dell PowerEdge]
OS: [e.g. Ubuntu, run printf "$(uname -srm)\n$(cat /etc/os-release)\n"]
Version: [e.g. 1.0.0]
Lint eError
To Reproduce
make lint
Expected behavior
It should build
Screenshots
look up
Additional context
Add any other context about the problem here.
Describe the bug error in lint and unit test from PR #1095
make lint gets the following error:
make test
error:Environment (please complete the following information):
printf "$(uname -srm)\n$(cat /etc/os-release)\n"
]To Reproduce
Expected behavior It should build
Screenshots look up
Additional context Add any other context about the problem here.