As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Commit 3f86d313 authored by Stan Hu's avatar Stan Hu
Browse files

Merge branch 'id-remove-namespace-service-usage' into 'main'

Remove the RPC call for Namespace removal

See merge request https://gitlab.com/gitlab-org/gitlab-shell/-/merge_requests/895



Merged-by: default avatarStan Hu <stanhu@gmail.com>
Approved-by: default avatarStan Hu <stanhu@gmail.com>
Co-authored-by: default avatarIgor Drozdov <idrozdov@gitlab.com>
parents c497cb77 de9038bd
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -79,17 +79,16 @@ func ensureGitalyRepository(t *testing.T) (*grpc.ClientConn, *pb.Repository) {
conn, err := gitalyClient.Dial(gitalyConnInfo.Address, gitalyClient.DefaultDialOpts)
require.NoError(t, err)
namespace := pb.NewNamespaceServiceClient(conn)
repository := pb.NewRepositoryServiceClient(conn)
// Remove the repository if it already exists, for consistency
rmNsReq := &pb.RemoveNamespaceRequest{StorageName: gitalyConnInfo.Storage, Name: testRepoNamespace}
_, err = namespace.RemoveNamespace(context.Background(), rmNsReq)
require.NoError(t, err)
glRepository := &pb.Repository{StorageName: gitalyConnInfo.Storage, RelativePath: testRepo}
createReq := &pb.CreateRepositoryFromURLRequest{Repository: glRepository, Url: testRepoImportUrl}
// Remove the test repository before running the tests
removeReq := &pb.RemoveRepositoryRequest{Repository: glRepository}
// Ignore the error because the repository may not exist
repository.RemoveRepository(context.Background(), removeReq)
createReq := &pb.CreateRepositoryFromURLRequest{Repository: glRepository, Url: testRepoImportUrl}
_, err = repository.CreateRepositoryFromURL(context.Background(), createReq)
require.NoError(t, err)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment