Package com.atlassian.bamboo.repository
Class RepositoryModificationTestHelper
java.lang.Object
com.atlassian.bamboo.repository.RepositoryModificationTestHelper
Helper to apply modifications to working copies of repositories in order to test various operations, e.g. committing
changes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
createFileInCheckoutPath
(@NotNull File checkoutPath) Create a random file in the working copy.static void
deleteFileFromCheckoutPath
(@NotNull File checkoutPath) Delete a random file from the working copy.static @Nullable File
getRepositoryTrackedFile
(@NotNull File fileOrDirectory) Try to find any repository tracked file.static void
leaveCheckoutPathUnmodified
(@NotNull File checkoutPath) Do nothing with the working copy.static void
modifyFileInCheckoutPath
(@NotNull File checkoutPath) Modifies content of a random file in the working copy.
-
Method Details
-
leaveCheckoutPathUnmodified
Do nothing with the working copy. -
createFileInCheckoutPath
Create a random file in the working copy. -
deleteFileFromCheckoutPath
Delete a random file from the working copy. Will perform a recursive search. -
modifyFileInCheckoutPath
Modifies content of a random file in the working copy. Will perform a recursive search. -
getRepositoryTrackedFile
@Nullable public static @Nullable File getRepositoryTrackedFile(@NotNull @NotNull File fileOrDirectory) Try to find any repository tracked file.- Parameters:
fileOrDirectory
- either a directory to scan or a file to test- Returns:
- any file which is not a special repository file, or null if no file qualified
-