mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-12 08:23:48 +02:00
19 lines
358 B
Go
19 lines
358 B
Go
|
package common_test
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/woodpecker-ci/woodpecker/server/remote/common"
|
||
|
)
|
||
|
|
||
|
func Test_Netrc(t *testing.T) {
|
||
|
host, err := common.ExtractHostFromCloneURL("https://git.example.com/foo/bar.git")
|
||
|
if err != nil {
|
||
|
t.Fatal(err)
|
||
|
}
|
||
|
|
||
|
if host != "git.example.com" {
|
||
|
t.Errorf("Expected host to be git.example.com, got %s", host)
|
||
|
}
|
||
|
}
|