Skip to content
Snippets Groups Projects
Commit 9bdc82ff authored by nfcalabria's avatar nfcalabria
Browse files

Minor additions

parent 3d890fb3
Branches
Tags
No related merge requests found
Pipeline #2210 passed
...@@ -112,13 +112,13 @@ public class CopyServiceTest { ...@@ -112,13 +112,13 @@ public class CopyServiceTest {
fileInfo.setOsPath(getTestFilePath(fileName, directory)); fileInfo.setOsPath(getTestFilePath(fileName, directory));
fileInfo.setVirtualPath(vosPath); fileInfo.setVirtualPath(vosPath);
fileInfo.setPublic(false); fileInfo.setPublic(false);
fileInfo.setOwnerId("user_copy"); fileInfo.setOwnerId(userId);
return fileInfo; return fileInfo;
} }
private String getTestFilePath(String fileName, File directory) { private String getTestFilePath(String fileName, File directory) {
return directory.toPath().resolve("subdir").resolve(fileName).toFile().getAbsolutePath(); return directory.toPath().resolve(fileName).toFile().getAbsolutePath();
} }
private File createFile(File parent, String filename) throws Exception { private File createFile(File parent, String filename) throws Exception {
...@@ -134,6 +134,7 @@ public class CopyServiceTest { ...@@ -134,6 +134,7 @@ public class CopyServiceTest {
private TokenPrincipal fakePrincipal(String name) { private TokenPrincipal fakePrincipal(String name) {
TokenPrincipal principal = mock(TokenPrincipal.class); TokenPrincipal principal = mock(TokenPrincipal.class);
when(principal.getName()).thenReturn(name); when(principal.getName()).thenReturn(name);
when(principal.getToken()).thenReturn("any_token_not_null");
return principal; return principal;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment