summaryrefslogtreecommitdiff
path: root/internal/command
diff options
context:
space:
mode:
Diffstat (limited to 'internal/command')
-rw-r--r--internal/command/personalaccesstoken/personalaccesstoken_test.go7
-rw-r--r--internal/command/twofactorrecover/twofactorrecover_test.go5
-rw-r--r--internal/command/uploadpack/gitalycall_test.go9
3 files changed, 9 insertions, 12 deletions
diff --git a/internal/command/personalaccesstoken/personalaccesstoken_test.go b/internal/command/personalaccesstoken/personalaccesstoken_test.go
index 5970142..aa56ce9 100644
--- a/internal/command/personalaccesstoken/personalaccesstoken_test.go
+++ b/internal/command/personalaccesstoken/personalaccesstoken_test.go
@@ -8,7 +8,6 @@ import (
"net/http"
"testing"
- "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitlab-shell/client/testserver"
@@ -174,13 +173,13 @@ func TestExecute(t *testing.T) {
err := cmd.Execute(context.Background())
if tc.expectedError == "" {
- assert.NoError(t, err)
+ require.NoError(t, err)
} else {
- assert.EqualError(t, err, tc.expectedError)
+ require.EqualError(t, err, tc.expectedError)
}
if tc.expectedOutput != "" {
- assert.Equal(t, tc.expectedOutput, output.String())
+ require.Equal(t, tc.expectedOutput, output.String())
}
})
}
diff --git a/internal/command/twofactorrecover/twofactorrecover_test.go b/internal/command/twofactorrecover/twofactorrecover_test.go
index ea6abd6..92e3779 100644
--- a/internal/command/twofactorrecover/twofactorrecover_test.go
+++ b/internal/command/twofactorrecover/twofactorrecover_test.go
@@ -8,7 +8,6 @@ import (
"net/http"
"testing"
- "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitlab-shell/client/testserver"
@@ -130,8 +129,8 @@ func TestExecute(t *testing.T) {
err := cmd.Execute(context.Background())
- assert.NoError(t, err)
- assert.Equal(t, tc.expectedOutput, output.String())
+ require.NoError(t, err)
+ require.Equal(t, tc.expectedOutput, output.String())
})
}
}
diff --git a/internal/command/uploadpack/gitalycall_test.go b/internal/command/uploadpack/gitalycall_test.go
index 22189b8..d49e11e 100644
--- a/internal/command/uploadpack/gitalycall_test.go
+++ b/internal/command/uploadpack/gitalycall_test.go
@@ -5,7 +5,6 @@ import (
"context"
"testing"
- "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitlab-shell/client/testserver"
@@ -43,7 +42,7 @@ func TestUploadPack(t *testing.T) {
require.Equal(t, "UploadPack: "+repo, output.String())
entries := hook.AllEntries()
- assert.Equal(t, 2, len(entries))
+ require.Equal(t, 2, len(entries))
require.Contains(t, entries[1].Message, "executing git command")
require.Contains(t, entries[1].Message, "command=git-upload-pack")
require.Contains(t, entries[1].Message, "gl_key_type=key")
@@ -54,8 +53,8 @@ func TestUploadPack(t *testing.T) {
"gitaly-feature-inforef_uploadpack_cache": "false",
} {
actual := testServer.ReceivedMD[k]
- assert.Len(t, actual, 1)
- assert.Equal(t, v, actual[0])
+ require.Len(t, actual, 1)
+ require.Equal(t, v, actual[0])
}
- assert.Empty(t, testServer.ReceivedMD["some-other-ff"])
+ require.Empty(t, testServer.ReceivedMD["some-other-ff"])
}