@@ -17,8 +17,8 @@ type testFns struct {
17
17
RunFn func (ctx context.Context , id string , logs io.Writer ) error
18
18
// CleanupFn is optional if no cleanup is required.
19
19
CleanupFn func (ctx context.Context , id string , logs io.Writer ) error
20
- // CollectableFn is optional if byte transfer tracking is required.
21
- CollectableFn func () (int64 , int64 )
20
+ // getBytesTransferred is optional if byte transfer tracking is required.
21
+ getBytesTransferred func () (int64 , int64 )
22
22
}
23
23
24
24
// Run implements Runnable.
@@ -28,11 +28,11 @@ func (fns testFns) Run(ctx context.Context, id string, logs io.Writer) error {
28
28
29
29
// GetBytesTransferred implements Collectable.
30
30
func (fns testFns ) GetBytesTransferred () (bytesRead int64 , bytesWritten int64 ) {
31
- if fns .CollectableFn == nil {
31
+ if fns .getBytesTransferred == nil {
32
32
return 0 , 0
33
33
}
34
34
35
- return fns .CollectableFn ()
35
+ return fns .getBytesTransferred ()
36
36
}
37
37
38
38
// Cleanup implements Cleanable.
@@ -65,7 +65,7 @@ func Test_TestRun(t *testing.T) {
65
65
atomic .AddInt64 (& cleanupCalled , 1 )
66
66
return nil
67
67
},
68
- CollectableFn : func () (int64 , int64 ) {
68
+ getBytesTransferred : func () (int64 , int64 ) {
69
69
atomic .AddInt64 (& collectableCalled , 1 )
70
70
return 0 , 0
71
71
},
@@ -132,7 +132,7 @@ func Test_TestRun(t *testing.T) {
132
132
RunFn : func (ctx context.Context , id string , logs io.Writer ) error {
133
133
return nil
134
134
},
135
- CollectableFn : nil ,
135
+ getBytesTransferred : nil ,
136
136
})
137
137
138
138
err := run .Run (context .Background ())
0 commit comments