Skip to content
Snippets Groups Projects
Commit 6e8c7462 authored by felmer's avatar felmer
Browse files

SSDM-4824: fixing (un)archiving DSS system tests

SVN: 37802
parent bf291fad
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,7 @@ import org.testng.annotations.Test;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.ArchivingStatus;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.archive.DataSetArchiveOptions;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.id.DataSetPermId;
import ch.systemsx.cisd.common.exceptions.AuthorizationFailureException;
import ch.systemsx.cisd.common.exceptions.UserFailureException;
/**
......@@ -41,7 +42,7 @@ public class ArchiveDataSetTest extends AbstractArchiveUnarchiveDataSetTest
v3.archiveDataSets(sessionToken, Arrays.asList(dataSetId), options);
}
@Test(expectedExceptions = UserFailureException.class, expectedExceptionsMessageRegExp = ".*Access denied to object with DataSetPermId.*")
@Test(expectedExceptions = AuthorizationFailureException.class, expectedExceptionsMessageRegExp = ".*User 'test_space' does not have enough privileges.*")
public void testArchiveWithUnauthorizedDataSet() throws Exception
{
registerDataSet();
......
......@@ -24,6 +24,7 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.ArchivingStatus;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.archive.DataSetArchiveOptions;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.id.DataSetPermId;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.unarchive.DataSetUnarchiveOptions;
import ch.systemsx.cisd.common.exceptions.AuthorizationFailureException;
import ch.systemsx.cisd.common.exceptions.UserFailureException;
/**
......@@ -42,7 +43,7 @@ public class UnarchiveDataSetTest extends AbstractArchiveUnarchiveDataSetTest
v3.unarchiveDataSets(sessionToken, Arrays.asList(dataSetId), options);
}
@Test(expectedExceptions = UserFailureException.class, expectedExceptionsMessageRegExp = ".*Access denied to object with DataSetPermId.*")
@Test(expectedExceptions = AuthorizationFailureException.class, expectedExceptionsMessageRegExp = ".*User 'test_space' does not have enough privileges.*")
public void testUnarchiveWithUnauthorizedDataSet() throws Exception
{
registerDataSet();
......
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