MCPcopy Index your code
hub / github.com/git-lfs/git-lfs / TestRemoteURLs

Function TestRemoteURLs

git/git_test.go:773–796  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

771}
772
773func TestRemoteURLs(t *testing.T) {
774 repo := test.NewRepo(t)
775 repo.Pushd()
776 defer func() {
777 repo.Popd()
778 repo.Cleanup()
779 }()
780 cfg := repo.GitConfig()
781 cfg.SetLocal("remote.foo.url", "https://github.com/git-lfs/git-lfs.git")
782 cfg.SetLocal("remote.bar.url", "https://github.com/git-lfs/wildmatch.git")
783 cfg.SetLocal("remote.bar.pushurl", "https://github.com/git-lfs/pktline.git")
784
785 expected := make(map[string][]string)
786 expected["foo"] = []string{"https://github.com/git-lfs/git-lfs.git"}
787 expected["bar"] = []string{"https://github.com/git-lfs/wildmatch.git"}
788 actual, err := RemoteURLs(false)
789 assert.Nil(t, err)
790 assert.Equal(t, expected, actual)
791
792 expected["bar"] = []string{"https://github.com/git-lfs/pktline.git"}
793 actual, err = RemoteURLs(true)
794 assert.Nil(t, err)
795 assert.Equal(t, expected, actual)
796}
797
798func TestMapRemoteURL(t *testing.T) {
799 repo := test.NewRepo(t)

Callers

nothing calls this directly

Calls 7

PushdMethod · 0.95
PopdMethod · 0.95
CleanupMethod · 0.95
GitConfigMethod · 0.95
RemoteURLsFunction · 0.85
SetLocalMethod · 0.80
EqualMethod · 0.45

Tested by

no test coverage detected