(t *testing.T)
| 12 | ) |
| 13 | |
| 14 | func 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 | |
| 38 | func TestRepositoryCreateSampleRepo(t *testing.T) { |
| 39 | ctx := t.Context() |
nothing calls this directly
no test coverage detected