MCPcopy
hub / github.com/git-lfs/git-lfs / TestBasicAdapterExists

Function TestBasicAdapterExists

tq/transfer_test.go:44–69  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

42}
43
44func TestBasicAdapterExists(t *testing.T) {
45 m := NewManifest(nil, nil, "", "")
46
47 assert := assert.New(t)
48
49 dls := m.GetDownloadAdapterNames()
50 if assert.NotNil(dls) {
51 assert.ElementsMatch([]string{"basic", "lfs-standalone-file", "ssh"}, dls)
52 }
53 uls := m.GetUploadAdapterNames()
54 if assert.NotNil(uls) {
55 assert.ElementsMatch([]string{"basic", "lfs-standalone-file", "ssh"}, dls)
56 }
57
58 da := m.NewDownloadAdapter("basic")
59 if assert.NotNil(da) {
60 assert.Equal("basic", da.Name())
61 assert.Equal(Download, da.Direction())
62 }
63
64 ua := m.NewUploadAdapter("basic")
65 if assert.NotNil(ua) {
66 assert.Equal("basic", ua.Name())
67 assert.Equal(Upload, ua.Direction())
68 }
69}
70
71func TestAdapterRegAndOverride(t *testing.T) {
72 m := NewManifest(nil, nil, "", "")

Callers

nothing calls this directly

Calls 8

GetUploadAdapterNamesMethod · 0.95
NewDownloadAdapterMethod · 0.95
NewUploadAdapterMethod · 0.95
NewManifestFunction · 0.85
NameMethod · 0.65
DirectionMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected