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 RepositorygetGitRepository(@NotNull GitRepositoryDescriptor repositoryDescriptor) Creates a GitRepositoryobject for further usage in tests, e.g. withBackdoor.repositories().static @NotNull RepositorygetGitRepository(@NotNull String repositoryUrl) Creates a GitRepositoryobject for further usage in tests, e.g. withBackdoor.repositories().static @NotNull RepositorygetSvnRepository(@NotNull SvnRepositoryDescriptor repositoryDescriptor, @NotNull String svnSubDir) Creates an SVNRepositoryobject for further usage in tests, e.g. withBackdoor.repositories().static @NotNull RepositorygetSvnRepository(@NotNull String repositoryRoot, @NotNull String branchName) Creates an SVNRepositoryobject for further usage in tests, e.g. withBackdoor.repositories().static @NotNull RestRepositoryConfigtoRestRepositoryConfig(@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 GitRepositoryobject 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 ofLocalGitSetupHelpermethods.- Returns:
- instantiated repository object
-
getGitRepository
Creates a GitRepositoryobject 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 SVNRepositoryobject 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 ofLocalRepositorySetupHelpermethods.svnSubDir- SVN subdirectory- Returns:
- instantiated repository object
-
getSvnRepository
@NotNull public static @NotNull Repository getSvnRepository(@NotNull @NotNull String repositoryRoot, @NotNull @NotNull String branchName) Creates an SVNRepositoryobject 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
-