Skip to content

Commit

Permalink
Fix test vetting errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
roblillack committed Mar 19, 2022
1 parent bc57f82 commit 65ad5a2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/watcher/watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ func TestWatcher(t *testing.T) {

bla := &SimpleRefresher{}
if err := w.Listen(bla, tmp); err != nil {
t.Errorf("unable to setup listener: %w", err)
t.Errorf("unable to setup listener: %s", err)
}

if err := w.Notify(); err != nil {
t.Errorf("unable to notify listeners: %w", err)
t.Errorf("unable to notify listeners: %s", err)
}
if bla.Refreshed {
t.Error("No changes to tmp dir yet, should not have been refreshed.")
Expand All @@ -52,7 +52,7 @@ func TestWatcher(t *testing.T) {
time.Sleep(1 * time.Second)

if err := w.Notify(); err != nil {
t.Errorf("unable to notify listeners: %w", err)
t.Errorf("unable to notify listeners: %s", err)
}
if !bla.Refreshed {
t.Error("Should have been refreshed.")
Expand All @@ -74,11 +74,11 @@ func TestErrorWhileRefreshing(t *testing.T) {

bla := &SimpleRefresher{Error: errors.New("uh-oh something went wrong!!!11")}
if err := w.Listen(bla, tmp); err != nil {
t.Errorf("unable to setup listener: %w", err)
t.Errorf("unable to setup listener: %s", err)
}

if err := w.Notify(); err != nil {
t.Errorf("unable to notify listeners: %w", err)
t.Errorf("unable to notify listeners: %s", err)
}
if bla.Refreshed {
t.Error("No changes to tmp dir yet, should not have been refreshed.")
Expand Down Expand Up @@ -108,7 +108,7 @@ func TestErrorWhileRefreshing(t *testing.T) {
time.Sleep(1 * time.Second)

if err := w.Notify(); err != nil {
t.Errorf("error not resovled yet: %w", err)
t.Errorf("error not resovled yet: %s", err)
}
if !bla.Refreshed {
t.Error("Should have been refreshed.")
Expand Down

0 comments on commit 65ad5a2

Please sign in to comment.