dell / csi-baremetal

Bare-metal CSI Driver
Apache License 2.0
71 stars 34 forks source link

22498 - lint issue with previous fix for lsblk.go #1096

Closed eddiepavkovic closed 6 months ago

eddiepavkovic commented 6 months ago

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):

To Reproduce

make lint 

Expected behavior It should build

Screenshots look up

Additional context Add any other context about the problem here.

eddiepavkovic commented 6 months ago

PR #1098 merged