(t *testing.T)
| 87 | } |
| 88 | |
| 89 | func TestCustomTransferBothConfig(t *testing.T) { |
| 90 | path := "/path/to/binary" |
| 91 | args := "-c 1 --whatever --yeah" |
| 92 | cli, err := lfsapi.NewClient(lfshttp.NewContext(nil, nil, map[string]string{ |
| 93 | "lfs.customtransfer.testboth.path": path, |
| 94 | "lfs.customtransfer.testboth.args": args, |
| 95 | "lfs.customtransfer.testboth.concurrent": "yes", |
| 96 | "lfs.customtransfer.testboth.direction": "both", |
| 97 | })) |
| 98 | require.Nil(t, err) |
| 99 | |
| 100 | m := NewManifest(nil, cli, "", "") |
| 101 | d := m.NewDownloadAdapter("testboth") |
| 102 | assert.NotNil(t, d, "Download adapter should be present") |
| 103 | cd, _ := d.(*customAdapter) |
| 104 | assert.NotNil(t, cd, "Download adapter should be customAdapter") |
| 105 | assert.Equal(t, cd.path, path, "Path should be correct") |
| 106 | assert.Equal(t, cd.args, args, "args should be correct") |
| 107 | assert.Equal(t, cd.concurrent, true, "concurrent should be set") |
| 108 | |
| 109 | u := m.NewUploadAdapter("testboth") |
| 110 | assert.NotNil(t, u, "Upload adapter should be present") |
| 111 | cu, _ := u.(*customAdapter) |
| 112 | assert.NotNil(t, cu, "Upload adapter should be customAdapter") |
| 113 | assert.Equal(t, cu.path, path, "Path should be correct") |
| 114 | assert.Equal(t, cu.args, args, "args should be correct") |
| 115 | assert.Equal(t, cu.concurrent, true, "concurrent should be set") |
| 116 | } |
nothing calls this directly
no test coverage detected