This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/telemetry/git_test.go

23 lines
457 B
Go
Raw Normal View History

package telemetry
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestParseGit(t *testing.T) {
var (
endpoint string
err error
)
endpoint, err = parseGitURL("https://github.com/dagger/dagger")
require.NoError(t, err)
require.Equal(t, endpoint, "github.com/dagger/dagger")
endpoint, err = parseGitURL("git@github.com:dagger/dagger.git")
require.NoError(t, err)
require.Equal(t, endpoint, "github.com/dagger/dagger")
}