0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-06-21 08:16:57 +02:00
This commit is contained in:
Lunny Xiao 2026-06-07 15:50:48 -07:00
parent 8c1d77847b
commit 091ed6b756
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A

View File

@ -8,7 +8,6 @@ import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestNewClient(t *testing.T) {
@ -23,11 +22,11 @@ func TestNewClient(t *testing.T) {
func TestNewClientFromEndpoint(t *testing.T) {
client, err := NewClientFromEndpoint("ssh://git@example.com/owner/repo.git", "", nil)
require.NoError(t, err)
assert.NoError(t, err)
assert.NotNil(t, client)
client, err = NewClientFromEndpoint("ftp://example.com/owner/repo.git", "", nil)
assert.Nil(t, client)
require.Error(t, err)
assert.Error(t, err)
assert.Contains(t, err.Error(), "unable to determine LFS endpoint")
}