mirror of
https://github.com/go-task/task.git
synced 2025-11-23 22:24:45 +02:00
feat(remote): support include git remote (#1652)
This commit is contained in:
22
taskfile/node_test.go
Normal file
22
taskfile/node_test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package taskfile
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestScheme(t *testing.T) {
|
||||
scheme, err := getScheme("https://github.com/foo/bar.git")
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "git", scheme)
|
||||
scheme, err = getScheme("https://github.com/foo/bar.git?ref=v1//taskfile/common.yml")
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "git", scheme)
|
||||
scheme, err = getScheme("git@github.com:foo/bar.git?ref=main//Taskfile.yml")
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "git", scheme)
|
||||
scheme, err = getScheme("https://github.com/foo/common.yml")
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "https", scheme)
|
||||
}
|
||||
Reference in New Issue
Block a user