fork/gdu

git clone https://git.julia.blue/fork/gdu

Quet Zalfeat(analyze): add SQLite analyzer and some assorted changes (#484)da638da

master
557 B27 linesraw
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() {
16	log.SetLevel(log.WarnLevel)
17}
18
19func TestShowDevicesWithErr(t *testing.T) {
20	output := bytes.NewBuffer(make([]byte, 10))
21
22	getter := device.LinuxDevicesInfoGetter{MountsPath: "/xyzxyz"}
23	ui := CreateStdoutUI(output, false, true, false, false, false, false, false, "", 0, false, 0)
24	err := ui.ListDevices(getter)
25
26	assert.Contains(t, err.Error(), "no such file")
27}