Files
my-rook-config/pkg/daemon/discover
Haichao Li c0a7297931 tests: Fix ProbeDevices function unit test failure
During the sgdisk command test, there was no output assignment,
causing uuid not found for device /dev/testa. Follow the log.

2020-04-27 18:24:21.921337 I | rook-discover: RUN Command lsblk
  [--all --noheadings --list --output KNAME]
2020-04-27 18:24:21.921491 I | rook-discover: RUN Command lsblk
[/dev/testa --bytes --nodeps --pairs --paths --output SIZE,ROTA,
RO,TYPE,PKNAME,NAME]
2020-04-27 18:24:21.921549 I | rook-discover: RUN Command sgdisk
[--print /dev/testa]
2020-04-27 18:24:21.921576 W | inventory: skipping device "testa"
because 'lsblk' failed. uuid not found for device /dev/testa. output=
2020-04-27 18:24:21.921592 I | rook-discover: localdevices: []
2020-04-27 18:24:21.921598 I | rook-discover: available devices: []
--- FAIL: TestProbeDevices (0.00s)
    discover_test.go:95:
                Error Trace:    discover_test.go:95
                Error:          Not equal:
                                expected: 1
                                actual  : 0
                Test:           TestProbeDevices
panic: runtime error: index out of range [0] with length 0 [recovered]
        panic: runtime error: index out of range [0] with length 0
FAIL    github.com/rook/rook/pkg/daemon/discover        0.050s

Signed-off-by: Haichao Li <haichao.li@arm.com>
2020-04-28 17:51:22 +08:00
..