summaryrefslogtreecommitdiff
path: root/internal/command/shared
diff options
context:
space:
mode:
authorJohn Cai <jcai@gitlab.com>2020-05-04 10:59:49 -0700
committerJohn Cai <jcai@gitlab.com>2020-05-04 14:19:47 -0700
commit91f45342c4ff29a24c61812d539ac745dbb1570a (patch)
treeaec9280d8c4e1c0d02515f1ca9d46a65182cfb14 /internal/command/shared
parentf62a4b2fb89754372a346f24659212eb8da13601 (diff)
downloadgitlab-shell-jc-refactor-gitlabnet-client.tar.gz
Move gitlabnet client to client packagejc-refactor-gitlabnet-client
Diffstat (limited to 'internal/command/shared')
-rw-r--r--internal/command/shared/accessverifier/accessverifier_test.go2
-rw-r--r--internal/command/shared/customaction/customaction.go4
-rw-r--r--internal/command/shared/customaction/customaction_test.go2
3 files changed, 5 insertions, 3 deletions
diff --git a/internal/command/shared/accessverifier/accessverifier_test.go b/internal/command/shared/accessverifier/accessverifier_test.go
index cfcf4a8..998e622 100644
--- a/internal/command/shared/accessverifier/accessverifier_test.go
+++ b/internal/command/shared/accessverifier/accessverifier_test.go
@@ -9,11 +9,11 @@ import (
"github.com/stretchr/testify/require"
+ "gitlab.com/gitlab-org/gitlab-shell/client/testserver"
"gitlab.com/gitlab-org/gitlab-shell/internal/command/commandargs"
"gitlab.com/gitlab-org/gitlab-shell/internal/command/readwriter"
"gitlab.com/gitlab-org/gitlab-shell/internal/config"
"gitlab.com/gitlab-org/gitlab-shell/internal/gitlabnet/accessverifier"
- "gitlab.com/gitlab-org/gitlab-shell/internal/gitlabnet/testserver"
)
var (
diff --git a/internal/command/shared/customaction/customaction.go b/internal/command/shared/customaction/customaction.go
index 801ad63..2ba1091 100644
--- a/internal/command/shared/customaction/customaction.go
+++ b/internal/command/shared/customaction/customaction.go
@@ -4,6 +4,8 @@ import (
"bytes"
"errors"
+ "gitlab.com/gitlab-org/gitlab-shell/client"
+
"io"
"net/http"
@@ -93,7 +95,7 @@ func (c *Command) processApiEndpoints(response *accessverifier.Response) error {
return nil
}
-func (c *Command) performRequest(client *gitlabnet.GitlabClient, endpoint string, request *Request) (*Response, error) {
+func (c *Command) performRequest(client *client.GitlabNetClient, endpoint string, request *Request) (*Response, error) {
response, err := client.DoRequest(http.MethodPost, endpoint, request)
if err != nil {
return nil, err
diff --git a/internal/command/shared/customaction/customaction_test.go b/internal/command/shared/customaction/customaction_test.go
index 31044f9..46c5f32 100644
--- a/internal/command/shared/customaction/customaction_test.go
+++ b/internal/command/shared/customaction/customaction_test.go
@@ -9,10 +9,10 @@ import (
"github.com/stretchr/testify/require"
+ "gitlab.com/gitlab-org/gitlab-shell/client/testserver"
"gitlab.com/gitlab-org/gitlab-shell/internal/command/readwriter"
"gitlab.com/gitlab-org/gitlab-shell/internal/config"
"gitlab.com/gitlab-org/gitlab-shell/internal/gitlabnet/accessverifier"
- "gitlab.com/gitlab-org/gitlab-shell/internal/gitlabnet/testserver"
)
func TestExecuteEOFSent(t *testing.T) {