( ctx context.Context, t *testing.T, spaceStore store.SpaceStore, )
| 72 | } |
| 73 | |
| 74 | func createNestedSpacesForStorageSize( |
| 75 | ctx context.Context, |
| 76 | t *testing.T, |
| 77 | spaceStore store.SpaceStore, |
| 78 | ) []types.Space { |
| 79 | // Create root spaces |
| 80 | rootSpaces := []types.Space{ |
| 81 | {Identifier: "root-space-1", Description: "Root Space 1"}, |
| 82 | {Identifier: "root-space-2", Description: "Root Space 2"}, |
| 83 | {Identifier: "root-space-3", Description: "Root Space 3"}, |
| 84 | } |
| 85 | |
| 86 | for _, rootSpace := range rootSpaces { |
| 87 | err := spaceStore.Create(ctx, &rootSpace) |
| 88 | require.NoError(t, err) |
| 89 | |
| 90 | // Create nested subspaces for each root space |
| 91 | for j := 1; j <= 3; j++ { // Create 3 subspaces for each root space |
| 92 | subSpace := types.Space{ |
| 93 | Identifier: fmt.Sprintf("sub-space-%d-of-%s", j, rootSpace.Identifier), |
| 94 | ParentID: rootSpace.ID, // Set the parent ID to the root space ID |
| 95 | Description: fmt.Sprintf("Sub Space %d of %s", j, rootSpace.Identifier), |
| 96 | } |
| 97 | err = spaceStore.Create(ctx, &subSpace) |
| 98 | require.NoError(t, err) |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | return rootSpaces |
| 103 | } |
| 104 | |
| 105 | func createRepositoriesForSpaces( |
| 106 | ctx context.Context, |
no test coverage detected
searching dependent graphs…