lib/model: Helperize test os and remove error return value (#5507)

This commit is contained in:
Simon Frei
2019-02-05 19:01:05 +01:00
committed by Audrius Butkevicius
parent c75cfcfd06
commit 5d9d87f770
4 changed files with 27 additions and 26 deletions

View File

@@ -1835,7 +1835,7 @@ func TestROScanRecovery(t *testing.T) {
return
}
fd, _ := testOs.Create(filepath.Join(fcfg.Path, config.DefaultMarkerName))
fd := testOs.Create(filepath.Join(fcfg.Path, config.DefaultMarkerName))
fd.Close()
if err := waitFor(""); err != nil {
@@ -1922,10 +1922,7 @@ func TestRWScanRecovery(t *testing.T) {
return
}
fd, err := testOs.Create(filepath.Join(fcfg.Path, config.DefaultMarkerName))
if err != nil {
t.Fatal(err)
}
fd := testOs.Create(filepath.Join(fcfg.Path, config.DefaultMarkerName))
fd.Close()
if err := waitFor(""); err != nil {
@@ -3176,7 +3173,7 @@ func TestCustomMarkerName(t *testing.T) {
}
testOs.Mkdir(fcfg.Path, 0700)
fd, _ := testOs.Create(filepath.Join(fcfg.Path, "myfile"))
fd := testOs.Create(filepath.Join(fcfg.Path, "myfile"))
fd.Close()
if err := waitFor(""); err != nil {