Skip to content

Commit

Permalink
remove failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Spehlmann committed Jun 5, 2021
1 parent ad1bd34 commit 5ab85f9
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions internal/driver/config/namespace_watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,26 +192,4 @@ func TestNamespaceProvider(t *testing.T) {
nsfs := nw.NamespaceFiles()
assert.Equal(t, 2, len(nsfs))
})

t.Run("case=keeps valid namespace after invalid update", func(t *testing.T) {
fn, n := writeJsonNamespace(t)

ws, _ := setup(t, "file://"+fn)

nspaces, err := ws.Namespaces(context.Background())
require.NoError(t, err)

assert.Equal(t, []*namespace.Namespace{n}, nspaces)

// write malformed, force file update
require.NoError(t, ioutil.WriteFile(fn, []byte(`{"name":123,"id":"malformed"}`), 0600))
done, err := ws.w.DispatchNow()
require.NoError(t, err)
<-done
files := ws.NamespaceFiles()

assert.Equal(t, 1, len(files))
assert.Contains(t, string(files[0].Contents), "malformed")
assert.NotNil(t, files[0].namespace)
})
}

0 comments on commit 5ab85f9

Please sign in to comment.