MCPcopy Index your code
hub / github.com/OpenListTeam/OpenList / TestGetStorageVirtualFilesByPath

Function TestGetStorageVirtualFilesByPath

internal/op/storage_test.go:47–60  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

45}
46
47func TestGetStorageVirtualFilesByPath(t *testing.T) {
48 setupStorages(t)
49 virtualFiles := op.GetStorageVirtualFilesByPath("/a")
50 var names []string
51 for _, virtualFile := range virtualFiles {
52 names = append(names, virtualFile.GetName())
53 }
54 var expectedNames = []string{"b", "c", "d"}
55 if utils.SliceEqual(names, expectedNames) {
56 t.Logf("passed")
57 } else {
58 t.Errorf("expected: %+v, got: %+v", expectedNames, names)
59 }
60}
61
62func TestGetBalancedStorage(t *testing.T) {
63 set := mapset.NewSet[string]()

Callers

nothing calls this directly

Calls 4

SliceEqualFunction · 0.92
setupStoragesFunction · 0.85
GetNameMethod · 0.65

Tested by

no test coverage detected