MCPcopy Index your code
hub / github.com/rclone/rclone / TestInternalListRootAndInnerRemotes

Function TestInternalListRootAndInnerRemotes

backend/cache/cache_internal_test.go:101–121  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

99}
100
101func TestInternalListRootAndInnerRemotes(t *testing.T) {
102 id := fmt.Sprintf("tilrair%v", time.Now().Unix())
103 rootFs, _ := runInstance.newCacheFs(t, remoteName, id, true, true, nil)
104
105 // Instantiate inner fs
106 innerFolder := "inner"
107 runInstance.mkdir(t, rootFs, innerFolder)
108 rootFs2, _ := runInstance.newCacheFs(t, remoteName, id+"/"+innerFolder, true, true, nil)
109
110 runInstance.writeObjectString(t, rootFs2, "one", "content")
111 listRoot, err := runInstance.list(t, rootFs, "")
112 require.NoError(t, err)
113 listRootInner, err := runInstance.list(t, rootFs, innerFolder)
114 require.NoError(t, err)
115 listInner, err := rootFs2.List(context.Background(), "")
116 require.NoError(t, err)
117
118 require.Len(t, listRoot, 1)
119 require.Len(t, listRootInner, 1)
120 require.Len(t, listInner, 1)
121}
122
123/* TODO: is this testing something?
124func TestInternalVfsCache(t *testing.T) {

Callers

nothing calls this directly

Calls 6

newCacheFsMethod · 0.80
writeObjectStringMethod · 0.80
ListMethod · 0.65
mkdirMethod · 0.45
listMethod · 0.45
LenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…