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
1 changed files with 4 additions and 15 deletions

View File

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