-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: migrate run security-analysis endpoint to path with root network
Signed-off-by: LE SAULNIER Kevin <[email protected]>
- Loading branch information
LE SAULNIER Kevin
committed
Dec 11, 2024
1 parent
ea0d2b9
commit ac4bdf4
Showing
4 changed files
with
55 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/test/java/org/gridsuite/study/server/utils/StudyTestUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.gridsuite.study.server.utils; | ||
|
||
|
||
import org.gridsuite.study.server.repository.rootnetwork.RootNetworkRepository; | ||
import org.springframework.stereotype.Service; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
import java.util.UUID; | ||
|
||
@Service | ||
public class StudyTestUtils { | ||
private final RootNetworkRepository rootNetworkRepository; | ||
|
||
public StudyTestUtils(RootNetworkRepository rootNetworkRepository) { | ||
this.rootNetworkRepository = rootNetworkRepository; | ||
} | ||
|
||
@Transactional | ||
public UUID getStudyFirstRootNetworkUuid(UUID studyUuid) { | ||
return rootNetworkRepository.findAllByStudyId(studyUuid).get(0).getId(); | ||
} | ||
} |