watch: stop skipping tests (#145)

This commit is contained in:
Nick Santos 2018-08-22 15:48:33 -04:00 committed by Nicolas De loof
parent d4f074b32f
commit 664e6f6f23

View File

@ -5,7 +5,6 @@ import (
"io/ioutil" "io/ioutil"
"os" "os"
"path/filepath" "path/filepath"
"runtime"
"strings" "strings"
"testing" "testing"
"time" "time"
@ -176,22 +175,13 @@ func TestRemove(t *testing.T) {
} }
func TestRemoveAndAddBack(t *testing.T) { func TestRemoveAndAddBack(t *testing.T) {
t.Skip("Skipping broken test for now")
f := newNotifyFixture(t) f := newNotifyFixture(t)
defer f.tearDown() defer f.tearDown()
root, err := f.root.NewDir("root") path := filepath.Join(f.watched.Path(), "change")
if err != nil {
t.Fatal(err)
}
path := filepath.Join(root.Path(), "change")
if err != nil {
t.Fatal(err)
}
d1 := []byte("hello\ngo\n") d1 := []byte("hello\ngo\n")
err = ioutil.WriteFile(path, d1, 0644) err := ioutil.WriteFile(path, d1, 0644)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
@ -199,6 +189,8 @@ func TestRemoveAndAddBack(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
f.assertEvents(path)
err = os.Remove(path) err = os.Remove(path)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
@ -216,9 +208,6 @@ func TestRemoveAndAddBack(t *testing.T) {
} }
func TestSingleFile(t *testing.T) { func TestSingleFile(t *testing.T) {
if runtime.GOOS != "darwin" {
t.Skip("Broken on Linux")
}
f := newNotifyFixture(t) f := newNotifyFixture(t)
defer f.tearDown() defer f.tearDown()