Class RestRepositoryHelper
java.lang.Object
com.atlassian.bamboo.testutils.backdoor.repository.RestRepositoryHelper
Helper methods related to repository model classes in functional tests.
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Repository
getGitRepository
(@NotNull GitRepositoryDescriptor repositoryDescriptor) Creates a GitRepository
object for further usage in tests, e.g.static @NotNull Repository
getGitRepository
(@NotNull String repositoryUrl) Creates a GitRepository
object for further usage in tests, e.g.static @NotNull Repository
getSvnRepository
(@NotNull SvnRepositoryDescriptor repositoryDescriptor, @NotNull String svnSubDir) Creates an SVNRepository
object for further usage in tests, e.g.static @NotNull Repository
getSvnRepository
(@NotNull String repositoryRoot, @NotNull String branchName) Creates an SVNRepository
object for further usage in tests, e.g.static @NotNull RestRepositoryConfig
toRestRepositoryConfig
(@NotNull Repository repository, @NotNull String repositoryName) Converts the repository to it's REST representation.
-
Method Details
-
toRestRepositoryConfig
@NotNull public static @NotNull RestRepositoryConfig toRestRepositoryConfig(@NotNull @NotNull Repository repository, @NotNull @NotNull String repositoryName) Converts the repository to it's REST representation.- Parameters:
repository
- repository configurationrepositoryName
- display name of the repository- Returns:
- DTO of the given repository object
-
getGitRepository
@NotNull public static @NotNull Repository getGitRepository(@NotNull @NotNull GitRepositoryDescriptor repositoryDescriptor) Creates a GitRepository
object for further usage in tests, e.g. withBackdoor.repositories()
.This method currently does not provide security configuration settings. The repository has to be accessible from Bamboo.
- Parameters:
repositoryDescriptor
- repository descriptor, generated e.g. by calling one ofLocalGitSetupHelper
methods.- Returns:
- instantiated repository object
-
getGitRepository
Creates a GitRepository
object for further usage in tests, e.g. withBackdoor.repositories()
.This method currently does not provide security configuration settings. The repository has to be accessible from Bamboo.
- Parameters:
repositoryUrl
- url to the repository- Returns:
- instantiated repository object
-
getSvnRepository
@NotNull public static @NotNull Repository getSvnRepository(@NotNull @NotNull SvnRepositoryDescriptor repositoryDescriptor, @NotNull @NotNull String svnSubDir) Creates an SVNRepository
object for further usage in tests, e.g. withBackdoor.repositories()
.This method currently does not provide security configuration settings. The repository has to be accessible from Bamboo.
- Parameters:
repositoryDescriptor
- repository descriptor, generated e.g. by calling one ofLocalRepositorySetupHelper
methods.svnSubDir
- SVN subdirectory- Returns:
- instantiated repository object
-
getSvnRepository
@NotNull public static @NotNull Repository getSvnRepository(@NotNull @NotNull String repositoryRoot, @NotNull @NotNull String branchName) Creates an SVNRepository
object for further usage in tests, e.g. withBackdoor.repositories()
.This method currently does not provide security configuration settings. The repository has to be accessible from Bamboo.
- Parameters:
repositoryRoot
- url to the repositorybranchName
- realtive path to branch- Returns:
- instantiated repository object
-