Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Fixes #95: Improved key verification for login command (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloyan-raev authored Feb 27, 2018
1 parent d4c2c60 commit 48f45ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>io.goobox</groupId>
<artifactId>goobox-sync-storj</artifactId>
<version>0.0.21</version>
<version>0.0.22</version>
<packaging>jar</packaging>

<name>Goobox sync app for Storj</name>
Expand Down Expand Up @@ -62,7 +62,7 @@
<dependency>
<groupId>io.storj</groupId>
<artifactId>libstorj-java</artifactId>
<version>0.6.2</version>
<version>0.7.2</version>
</dependency>
<dependency>
<groupId>net.harawata</groupId>
Expand Down
6 changes: 4 additions & 2 deletions src/test/java/io/goobox/sync/storj/mocks/StorjMock.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void deleteFile(String bucketId, String fileId, DeleteFileCallback callba
}

@Mock
public void downloadFile(Bucket bucket, File file, DownloadFileCallback callback) throws KeysNotFoundException {
public long downloadFile(Bucket bucket, File file, DownloadFileCallback callback) throws KeysNotFoundException {
if (FILE_1.equals(file)) {
filesMock.addFile(FileMock.FILE_1);
callback.onComplete(file.getId(), FileMock.FILE_1.getPath().toString());
Expand All @@ -135,10 +135,11 @@ public void downloadFile(Bucket bucket, File file, DownloadFileCallback callback
} else {
callback.onError(file.getId(), Storj.STORJ_BRIDGE_FILE_NOTFOUND_ERROR, "error downloading");
}
return 0;
}

@Mock
public void uploadFile(Bucket bucket, String fileName, String localPath, UploadFileCallback callback)
public long uploadFile(Bucket bucket, String fileName, String localPath, UploadFileCallback callback)
throws KeysNotFoundException {
if (FileMock.FILE_1.getPath().toString().equals(localPath)) {
if (files.contains(FILE_1)) {
Expand All @@ -162,6 +163,7 @@ public void uploadFile(Bucket bucket, String fileName, String localPath, UploadF
} else {
callback.onError(localPath, Storj.ENOENT, "error uploading");
}
return 0;
}

public void modifyFile(File oldFile, File newFile) {
Expand Down

0 comments on commit 48f45ee

Please sign in to comment.