Merge branch '17816-singularity-cwd' into main refs #17816
[arvados.git] / lib / crunchrun / crunchrun_test.go
index 22d65334ed3bc2a30228c6ab5c55dbd51e674f6c..bb7ffdf0306b26b2f5c56062aaaaaf7b256e5447 100644 (file)
@@ -305,9 +305,11 @@ func (client *KeepTestClient) LocalLocator(locator string) (string, error) {
        return locator, nil
 }
 
-func (client *KeepTestClient) PutB(buf []byte) (string, int, error) {
-       client.Content = buf
-       return fmt.Sprintf("%x+%d", md5.Sum(buf), len(buf)), len(buf), nil
+func (client *KeepTestClient) BlockWrite(_ context.Context, opts arvados.BlockWriteOptions) (arvados.BlockWriteResponse, error) {
+       client.Content = opts.Data
+       return arvados.BlockWriteResponse{
+               Locator: fmt.Sprintf("%x+%d", md5.Sum(opts.Data), len(opts.Data)),
+       }, nil
 }
 
 func (client *KeepTestClient) ReadAt(string, []byte, int) (int, error) {
@@ -453,8 +455,8 @@ func (*KeepErrorTestClient) ManifestFileReader(manifest.Manifest, string) (arvad
        return nil, errors.New("KeepError")
 }
 
-func (*KeepErrorTestClient) PutB(buf []byte) (string, int, error) {
-       return "", 0, errors.New("KeepError")
+func (*KeepErrorTestClient) BlockWrite(context.Context, arvados.BlockWriteOptions) (arvados.BlockWriteResponse, error) {
+       return arvados.BlockWriteResponse{}, errors.New("KeepError")
 }
 
 func (*KeepErrorTestClient) LocalLocator(string) (string, error) {