Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
f5616c20
Commit
f5616c20
authored
8 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-4824: fixing CreateSampleTest
SVN: 37799
parent
6cf6b99e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateSampleTest.java
+8
-6
8 additions, 6 deletions
...thz/sis/openbis/systemtest/asapi/v3/CreateSampleTest.java
with
8 additions
and
6 deletions
openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateSampleTest.java
+
8
−
6
View file @
f5616c20
...
@@ -79,7 +79,7 @@ public class CreateSampleTest extends AbstractSampleTest
...
@@ -79,7 +79,7 @@ public class CreateSampleTest extends AbstractSampleTest
v3api
.
createSamples
(
sessionToken
,
Collections
.
singletonList
(
creation
));
v3api
.
createSamples
(
sessionToken
,
Collections
.
singletonList
(
creation
));
}
}
},
"
Unsupported object id [not-a-space-id]
"
);
},
"
Object with CreationId = [not-a-space-id] has not been found
"
);
}
}
...
@@ -87,8 +87,9 @@ public class CreateSampleTest extends AbstractSampleTest
...
@@ -87,8 +87,9 @@ public class CreateSampleTest extends AbstractSampleTest
public
void
testCreateSharedSampleWithNoHomeSpaceAndNoAdminRights
()
public
void
testCreateSharedSampleWithNoHomeSpaceAndNoAdminRights
()
{
{
final
String
code
=
"TEST_TO_FAIL"
;
final
String
code
=
"TEST_TO_FAIL"
;
SampleIdentifier
identifier
=
new
SampleIdentifier
(
"/"
+
code
);
assertAuthorizationFailureException
(
new
IDelegatedAction
()
assertUnauthorizedObjectAccessException
(
new
IDelegatedAction
()
{
{
@Override
@Override
public
void
execute
()
public
void
execute
()
...
@@ -102,15 +103,16 @@ public class CreateSampleTest extends AbstractSampleTest
...
@@ -102,15 +103,16 @@ public class CreateSampleTest extends AbstractSampleTest
v3api
.
createSamples
(
sessionToken
,
Collections
.
singletonList
(
creation
));
v3api
.
createSamples
(
sessionToken
,
Collections
.
singletonList
(
creation
));
}
}
});
}
,
identifier
);
}
}
@Test
@Test
public
void
testCreateSharedSampleWithNoAdminRights
()
public
void
testCreateSharedSampleWithNoAdminRights
()
{
{
final
String
code
=
"TEST_TO_FAIL"
;
final
String
code
=
"TEST_TO_FAIL"
;
SampleIdentifier
identifier
=
new
SampleIdentifier
(
"/"
+
code
);
assert
A
uthoriz
ationFailure
Exception
(
new
IDelegatedAction
()
assert
Una
uthoriz
edObjectAccess
Exception
(
new
IDelegatedAction
()
{
{
@Override
@Override
public
void
execute
()
public
void
execute
()
...
@@ -124,7 +126,7 @@ public class CreateSampleTest extends AbstractSampleTest
...
@@ -124,7 +126,7 @@ public class CreateSampleTest extends AbstractSampleTest
v3api
.
createSamples
(
sessionToken
,
Collections
.
singletonList
(
creation
));
v3api
.
createSamples
(
sessionToken
,
Collections
.
singletonList
(
creation
));
}
}
});
}
,
identifier
);
}
}
@Test
@Test
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment