Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DBRepo
Manage
Activity
Members
Labels
Plan
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FAIR Data Austria DB Repository
DBRepo
Commits
4d546682
Verified
Commit
4d546682
authored
Jan 29, 2024
by
Martin Weise
Browse files
Options
Downloads
Patches
Plain Diff
Updated problematic code piece
parent
e8a62be8
No related branches found
No related tags found
4 merge requests
!250
Master
,
!246
Dev
,
!244
Dev
,
!243
Dev
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/StoreEndpointUnitTest.java
+6
-6
6 additions, 6 deletions
.../test/java/at/tuwien/endpoints/StoreEndpointUnitTest.java
with
6 additions
and
6 deletions
dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/StoreEndpointUnitTest.java
+
6
−
6
View file @
4d546682
...
@@ -261,8 +261,8 @@ public class StoreEndpointUnitTest extends BaseUnitTest {
...
@@ -261,8 +261,8 @@ public class StoreEndpointUnitTest extends BaseUnitTest {
@Test
@Test
@WithMockUser
(
username
=
USER_1_USERNAME
,
authorities
=
"persist-query"
)
@WithMockUser
(
username
=
USER_1_USERNAME
,
authorities
=
"persist-query"
)
public
void
persist_ownWriteAll_succeeds
()
throws
UserNotFoundException
,
QueryStoreException
,
public
void
persist_ownWriteAll_succeeds
()
throws
UserNotFoundException
,
QueryStoreException
,
NotAllowedException
,
DatabaseConnectionException
,
QueryNotFoundException
,
DatabaseNotFoundException
,
NotAllowedException
,
QueryNotFoundException
,
DatabaseNotFoundException
,
ImageNotSupportedException
,
ImageNotSupportedException
,
AccessDeniedException
,
IdentifierAlreadyPublishedException
{
AccessDeniedException
,
IdentifierAlreadyPublishedException
{
/* mock */
/* mock */
when
(
userRepository
.
findByUsername
(
USER_1_USERNAME
))
when
(
userRepository
.
findByUsername
(
USER_1_USERNAME
))
...
@@ -296,8 +296,7 @@ public class StoreEndpointUnitTest extends BaseUnitTest {
...
@@ -296,8 +296,7 @@ public class StoreEndpointUnitTest extends BaseUnitTest {
protected
QueryDto
persist_generic
(
Long
databaseId
,
Database
database
,
Long
queryId
,
Query
query
,
protected
QueryDto
persist_generic
(
Long
databaseId
,
Database
database
,
Long
queryId
,
Query
query
,
UUID
userId
,
Principal
principal
,
DatabaseAccess
access
)
UUID
userId
,
Principal
principal
,
DatabaseAccess
access
)
throws
DatabaseNotFoundException
,
UserNotFoundException
,
QueryStoreException
,
QueryNotFoundException
,
throws
DatabaseNotFoundException
,
UserNotFoundException
,
QueryStoreException
,
QueryNotFoundException
,
ImageNotSupportedException
,
NotAllowedException
,
DatabaseConnectionException
,
ImageNotSupportedException
,
NotAllowedException
,
AccessDeniedException
,
IdentifierAlreadyPublishedException
{
AccessDeniedException
,
IdentifierAlreadyPublishedException
{
final
QueryPersistDto
request
=
QueryPersistDto
.
builder
()
final
QueryPersistDto
request
=
QueryPersistDto
.
builder
()
.
persist
(
true
)
.
persist
(
true
)
.
build
();
.
build
();
...
@@ -307,8 +306,9 @@ public class StoreEndpointUnitTest extends BaseUnitTest {
...
@@ -307,8 +306,9 @@ public class StoreEndpointUnitTest extends BaseUnitTest {
.
thenReturn
(
database
);
.
thenReturn
(
database
);
when
(
storeService
.
findOne
(
databaseId
,
queryId
,
principal
))
when
(
storeService
.
findOne
(
databaseId
,
queryId
,
principal
))
.
thenReturn
(
query
);
.
thenReturn
(
query
);
when
(
storeService
.
persist
(
databaseId
,
queryId
,
request
))
doReturn
(
query
)
.
thenReturn
(
query
);
.
when
(
storeService
)
.
persist
(
databaseId
,
queryId
,
request
);
if
(
access
!=
null
)
{
if
(
access
!=
null
)
{
log
.
trace
(
"mock access for database with id {} and user id {}"
,
databaseId
,
userId
);
log
.
trace
(
"mock access for database with id {} and user id {}"
,
databaseId
,
userId
);
when
(
accessService
.
find
(
databaseId
,
userId
))
when
(
accessService
.
find
(
databaseId
,
userId
))
...
...
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