(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestScheme(t *testing.T) { |
| 10 | t.Parallel() |
| 11 | |
| 12 | scheme, err := getScheme("https://github.com/foo/bar.git") |
| 13 | assert.NoError(t, err) |
| 14 | assert.Equal(t, "git", scheme) |
| 15 | scheme, err = getScheme("https://github.com/foo/bar.git?ref=v1//taskfile/common.yml") |
| 16 | assert.NoError(t, err) |
| 17 | assert.Equal(t, "git", scheme) |
| 18 | scheme, err = getScheme("git@github.com:foo/bar.git?ref=main//Taskfile.yml") |
| 19 | assert.NoError(t, err) |
| 20 | assert.Equal(t, "git", scheme) |
| 21 | scheme, err = getScheme("https://github.com/foo/common.yml") |
| 22 | assert.NoError(t, err) |
| 23 | assert.Equal(t, "https", scheme) |
| 24 | scheme, err = getScheme("https://some-azure-host.com/org/project/_git/repo") |
| 25 | assert.NoError(t, err) |
| 26 | assert.Equal(t, "git", scheme) |
| 27 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…