Skip to content
Snippets Groups Projects
Commit 064847ed authored by piotr.kupczyk@id.ethz.ch's avatar piotr.kupczyk@id.ethz.ch
Browse files

BIS-741 : AFS uses DSS store - more AFS tests

parent a2da7cd2
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
......@@ -35,7 +35,6 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import org.junit.After;
......@@ -44,8 +43,10 @@ import org.junit.Before;
import org.junit.Test;
import ch.ethz.sis.afs.manager.TransactionConnection;
import ch.ethz.sis.afsapi.dto.ExceptionReason;
import ch.ethz.sis.afsapi.dto.File;
import ch.ethz.sis.afsapi.dto.FreeSpace;
import ch.ethz.sis.afsapi.exception.ThrowableReason;
import ch.ethz.sis.afsclient.client.AfsClient;
import ch.ethz.sis.afsserver.server.Server;
import ch.ethz.sis.shared.io.IOUtils;
......@@ -260,6 +261,22 @@ public abstract class BaseApiClientTest
assertFileEquals(files.get(0), owner, "/" + FILE_BINARY, FILE_BINARY_NAME, false, (long) binaryData.length);
}
@Test
public void list_withRelativePath() throws Exception
{
login();
try
{
afsClient.list(owner, "/../" + FILE_BINARY, Boolean.FALSE);
}catch(Exception e){
ThrowableReason reason = (ThrowableReason) e.getCause();
String message = ((ExceptionReason) reason.getReason()).getMessage();
assertTrue(message.contains(
"Path given to: List - can't contain '/../'"));
}
}
@Test
public void free_returnsValue() throws Exception
{
......
......@@ -22,10 +22,7 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Set;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment