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

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

Closed
eddiepavkovic opened this issue Feb 25, 2024 · 1 comment · Fixed by #1098 or #1099
Closed

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

eddiepavkovic opened this issue Feb 25, 2024 · 1 comment · Fixed by #1098 or #1099
Assignees
Labels
bug Something isn't working

Comments

@eddiepavkovic
Copy link
Collaborator

eddiepavkovic commented Feb 25, 2024

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.

@eddiepavkovic eddiepavkovic added the bug Something isn't working label Feb 25, 2024
@eddiepavkovic eddiepavkovic self-assigned this Feb 26, 2024
eddiepavkovic added a commit that referenced this issue Feb 26, 2024
eddiepavkovic added a commit that referenced this issue Feb 26, 2024
- to fix unit test

Signed-off-by: Eddie Pavkovic <[email protected]>
eddiepavkovic added a commit that referenced this issue Feb 26, 2024
…#1098)

* [Issue #1096] - Fix lint error for bug atl-22498

Signed-off-by: Eddie Pavkovic <[email protected]>

* [Issue #1096] - Put code back that returned device if path set
- to fix unit test

Signed-off-by: Eddie Pavkovic <[email protected]>

* [ISSUE-1096] - Put back code from previous PR and removed invalid test case

Signed-off-by: Eddie Pavkovic <[email protected]>

---------

Signed-off-by: Eddie Pavkovic <[email protected]>
@eddiepavkovic
Copy link
Collaborator Author

PR #1098 merged

Andrzej-Zukowski pushed a commit that referenced this issue Feb 26, 2024
…#1098)

* [Issue #1096] - Fix lint error for bug atl-22498

Signed-off-by: Eddie Pavkovic <[email protected]>

* [Issue #1096] - Put code back that returned device if path set
- to fix unit test

Signed-off-by: Eddie Pavkovic <[email protected]>

* [ISSUE-1096] - Put back code from previous PR and removed invalid test case

Signed-off-by: Eddie Pavkovic <[email protected]>

---------

Signed-off-by: Eddie Pavkovic <[email protected]>
Andrzej-Zukowski pushed a commit that referenced this issue Feb 26, 2024
…#1098)

* [Issue #1096] - Fix lint error for bug atl-22498

Signed-off-by: Eddie Pavkovic <[email protected]>

* [Issue #1096] - Put code back that returned device if path set
- to fix unit test

Signed-off-by: Eddie Pavkovic <[email protected]>

* [ISSUE-1096] - Put back code from previous PR and removed invalid test case

Signed-off-by: Eddie Pavkovic <[email protected]>

---------

Signed-off-by: Eddie Pavkovic <[email protected]>
Signed-off-by: Andrzej Zukowski <[email protected]>
Andrzej-Zukowski added a commit that referenced this issue Feb 26, 2024
* [Issue-1084] Addjust scheduler extender algorithm

Signed-off-by: Andrzej Zukowski <[email protected]>

* [Issue-1084] Fixes after review

Signed-off-by: Andrzej Zukowski <[email protected]>

* [Issue-1091] 1.5.1 version (#1093)

Signed-off-by: Andrzej Zukowski <[email protected]>

* Finding drive vid in lsblk vendor (#1094)

* Finding drive vid in lsblk vendor

* addressing review comments

* Initializing device

---------

Signed-off-by: Andrzej Zukowski <[email protected]>

* [ISSUE-1096] Fix lint and unit test error for resolution to atl-22498 (#1098)

* [Issue #1096] - Fix lint error for bug atl-22498

Signed-off-by: Eddie Pavkovic <[email protected]>

* [Issue #1096] - Put code back that returned device if path set
- to fix unit test

Signed-off-by: Eddie Pavkovic <[email protected]>

* [ISSUE-1096] - Put back code from previous PR and removed invalid test case

Signed-off-by: Eddie Pavkovic <[email protected]>

---------

Signed-off-by: Eddie Pavkovic <[email protected]>
Signed-off-by: Andrzej Zukowski <[email protected]>

* [ISSUE-1096] Change component version to 1.6.0

Signed-off-by: Andrzej Zukowski <[email protected]>

---------

Signed-off-by: Andrzej Zukowski <[email protected]>
Signed-off-by: Eddie Pavkovic <[email protected]>
Co-authored-by: PrasantDell <[email protected]>
Co-authored-by: eddiepavkovic <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant