INNER CODE UNIT · Go
TestReadFromStorage
dundee/gdu · report/export_linux_test.go:15
func TestReadFromStorage(t *testing.T) {
fin := testdir.CreateTestDir()
defer fin()
const storagePath = "/tmp/badger-test2"
defer func() {
err := os.RemoveAll(storagePath)
if err != nil {
panic(err)
}
}()
output := bytes.NewBuffer(make([]byte, 10))
reportOutput := bytes.NewBuffer(make([]byte, 10))
ui := CreateExportUI(output, reportOutput, false, true, false, 0, 0, false, nil)
ui.SetIgnoreDirPaths([]string{"/xxx"})
ui.SetAnalyzer(analyze.CreateStoredAnalyzer(storagePath))