(t *testing.T)
| 10 | ) |
| 11 | |
| 12 | func TestCustomTransferBasicConfig(t *testing.T) { |
| 13 | path := "/path/to/binary" |
| 14 | cli, err := lfsapi.NewClient(lfshttp.NewContext(nil, nil, map[string]string{ |
| 15 | "lfs.customtransfer.testsimple.path": path, |
| 16 | })) |
| 17 | require.Nil(t, err) |
| 18 | |
| 19 | m := NewManifest(nil, cli, "", "") |
| 20 | u := m.NewUploadAdapter("testsimple") |
| 21 | assert.NotNil(t, u, "Upload adapter should be present") |
| 22 | cu, _ := u.(*customAdapter) |
| 23 | assert.NotNil(t, cu, "Upload adapter should be customAdapter") |
| 24 | assert.Equal(t, cu.path, path, "Path should be correct") |
| 25 | assert.Equal(t, cu.args, "", "args should be blank") |
| 26 | assert.Equal(t, cu.concurrent, true, "concurrent should be defaulted") |
| 27 | |
| 28 | d := m.NewDownloadAdapter("testsimple") |
| 29 | assert.NotNil(t, d, "Download adapter should be present") |
| 30 | cd, _ := u.(*customAdapter) |
| 31 | assert.NotNil(t, cd, "Download adapter should be customAdapter") |
| 32 | assert.Equal(t, cd.path, path, "Path should be correct") |
| 33 | assert.Equal(t, cd.args, "", "args should be blank") |
| 34 | assert.Equal(t, cd.concurrent, true, "concurrent should be defaulted") |
| 35 | } |
| 36 | |
| 37 | func TestCustomTransferDownloadConfig(t *testing.T) { |
| 38 | path := "/path/to/binary" |
nothing calls this directly
no test coverage detected