Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/qa/repositoryService/CreateRepository_test.go')
-rw-r--r--internal/qa/repositoryService/CreateRepository_test.go41
1 files changed, 41 insertions, 0 deletions
diff --git a/internal/qa/repositoryService/CreateRepository_test.go b/internal/qa/repositoryService/CreateRepository_test.go
new file mode 100644
index 000000000..abbde49d3
--- /dev/null
+++ b/internal/qa/repositoryService/CreateRepository_test.go
@@ -0,0 +1,41 @@
+package repositoryService_test
+
+import (
+ "context"
+ . "github.com/onsi/ginkgo/v2"
+ . "github.com/onsi/gomega"
+ "gitlab.com/gitlab-org/gitaly/v15/internal/qa/helpers"
+ "gitlab.com/gitlab-org/gitaly/v15/proto/go/gitalypb"
+ "google.golang.org/grpc"
+)
+
+var _ = Describe("CreateRepository", func() {
+ var (
+ client gitalypb.RepositoryServiceClient
+ conn *grpc.ClientConn
+ err error
+ )
+
+ BeforeEach(func() {
+ //socketPath := filepath.Join(cfg.Storages[0].Path, "/Users/john/dev/gdk", "gitaly.socket")
+ conn, err = grpc.Dial("gdk.test:9999", grpc.WithInsecure())
+ Expect(err).NotTo(HaveOccurred())
+
+ client = gitalypb.NewRepositoryServiceClient(conn)
+ })
+
+ AfterEach(func() {
+ conn.Close()
+ })
+
+ It("should create a repository successfully", func() {
+ repo := helpers.NewRepository()
+
+ resp, err := client.CreateRepository(context.Background(), &gitalypb.CreateRepositoryRequest{
+ Repository: repo,
+ })
+ Expect(err).NotTo(HaveOccurred())
+ Expect(resp).NotTo(BeNil())
+ // TODO: Assert that repository was created successfully
+ })
+})