MCPcopy
hub / github.com/ha/doozerd / TestGetWithDir

Function TestGetWithDir

src/pkg/store/store_test.go:391–401  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

389}
390
391func TestGetWithDir(t *testing.T) {
392 st := New()
393 defer close(st.Ops)
394 st.Ops <- Op{1, MustEncodeSet("/x", "a", Clobber)}
395 st.Ops <- Op{2, MustEncodeSet("/y", "b", Clobber)}
396 sync(st, 2)
397 dents, rev := st.Get("/")
398 assert.Equal(t, Dir, rev)
399 sort.SortStrings(dents)
400 assert.Equal(t, []string{"x", "y"}, dents)
401}
402
403func TestStatWithDir(t *testing.T) {
404 st := New()

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
MustEncodeSetFunction · 0.85
syncFunction · 0.85
GetMethod · 0.65

Tested by

no test coverage detected