swarm/api: wait for key to be persisted. solving TestClientUploadDownloadDirectory

This commit is contained in:
Anton Evangelatov 2018-02-12 17:39:53 +01:00
parent 9e61e26ad5
commit 03f7465ca2

View file

@ -64,7 +64,8 @@ func (a *Api) NewManifest() (storage.Key, error) {
if err != nil {
return nil, err
}
key, _, err := a.Store(bytes.NewReader(data), int64(len(data)))
key, wait, err := a.Store(bytes.NewReader(data), int64(len(data)))
wait()
return key, err
}