fork/gdu
git clone https://git.julia.blue/fork/gdu
da638da
master
1//go:build linux 2 3package stdout 4 5import ( 6"bytes" 7"testing" 8 9 log"github.com/sirupsen/logrus" 10 11"github.com/dundee/gdu/v5/pkg/device" 12"github.com/stretchr/testify/assert" 13) 14 15func init () { 16log .SetLevel (log .WarnLevel ) 17} 18 19func TestShowDevicesWithErr (t * testing.T ) { 20output := bytes .NewBuffer (make ([]byte ,10 )) 21 22getter := device.LinuxDevicesInfoGetter {MountsPath :"/xyzxyz" } 23ui := CreateStdoutUI (output ,false ,true ,false ,false ,false ,false ,false ,"" ,0 ,false ,0 ) 24err := ui .ListDevices (getter ) 25 26assert .Contains (t ,err .Error (),"no such file" ) 27}