MCPcopy
hub / github.com/treeverse/lakeFS / TestRepositoryBasicOps

Function TestRepositoryBasicOps

esti/repository_test.go:14–36  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestRepositoryBasicOps(t *testing.T) {
15 ctx := t.Context()
16 const numOfRepos = 5
17
18 // create repositories
19 repos := make([]string, numOfRepos)
20 for i := range repos {
21 repos[i] = createRepositoryUnique(ctx, t)
22 }
23
24 // list repositories - make sure we have the ones we created
25 listedRepos := listRepositoriesIDs(t, ctx)
26 for _, repo := range repos {
27 require.Contains(t, listedRepos, repo, "repository missing in listing")
28 }
29
30 // delete repositories
31 for _, repo := range repos {
32 resp, err := client.DeleteRepositoryWithResponse(ctx, repo, &apigen.DeleteRepositoryParams{})
33 require.NoErrorf(t, err, "failed to delete repository %s", repo)
34 require.Equal(t, http.StatusNoContent, resp.StatusCode())
35 }
36}
37
38func TestRepositoryCreateSampleRepo(t *testing.T) {
39 ctx := t.Context()

Callers

nothing calls this directly

Calls 6

createRepositoryUniqueFunction · 0.85
listRepositoriesIDsFunction · 0.85
ContainsMethod · 0.80
EqualMethod · 0.80
StatusCodeMethod · 0.65

Tested by

no test coverage detected