|
KiCad PCB EDA Suite
|
Regression tests for LIBGIT_BACKEND, KIGIT_COMMON, GIT_INIT_HANDLER, GIT_PULL_HANDLER, GIT_PUSH_HANDLER, GIT_COMMIT_HANDLER focused on the recent Git integration bug fixes and the Amend Last Commit feature. More...
#include <qa_utils/wx_utils/unit_test_utils.h>#include <dialogs/git/git_status_entries.h>#include <git/git_backend.h>#include <git/libgit_backend.h>#include <git/kicad_git_common.h>#include <git/kicad_git_memory.h>#include <git/git_status_handler.h>#include <git/project_git_utils.h>#include <wildcards_and_files_ext.h>#include <git/git_init_handler.h>#include <git/git_branch_handler.h>#include <git/git_pull_handler.h>#include <git/git_push_handler.h>#include <git/git_commit_handler.h>#include <git/git_clone_handler.h>#include <qa_utils/git_test_fixture.h>#include <git2.h>#include <project.h>#include <project/project_local_settings.h>#include <settings/settings_manager.h>#include <sys/stat.h>#include <unistd.h>#include <fstream>#include <future>#include <set>#include <thread>#include <wx/ffile.h>#include <wx/file.h>#include <wx/filename.h>#include <wx/textfile.h>Go to the source code of this file.
Classes | |
| struct | GIT_BACKEND_FIXTURE |
| Build a temp directory tree containing a local working repo with one commit and a bare "remote" repo cloned from it. More... | |
| class | CLONE_CANCEL_REPORTER |
Functions | |
| BOOST_AUTO_TEST_CASE (FetchHeadMarksAtMostOneBranchToMerge) | |
| BOOST_AUTO_TEST_CASE (PerformPull_RefusesACommitThatBringsGitLfs) | |
| BOOST_AUTO_TEST_CASE (PushProgressStopsWhenTheOperationIsCancelled) | |
| BOOST_AUTO_TEST_CASE (IsWithinProjectPath_ScopesToProjectDirectory) | |
| BOOST_AUTO_TEST_CASE (GetDifferentFiles_SameTreeAmendHidesAheadFiles) | |
| BOOST_AUTO_TEST_CASE (GetDifferentFiles_DifferentTreeAmendKeepsAheadFile) | |
| BOOST_AUTO_TEST_CASE (PerformPull_NoUpstreamConfig_FallbackSucceedsAndWritesUpstream) | |
| BOOST_AUTO_TEST_CASE (PerformPull_RebaseConfigReplaysLocalCommit) | |
| With pull.rebase set, a pull over diverged history must replay the local commit onto the remote one and leave no rebase in progress. | |
| BOOST_AUTO_TEST_CASE (Push_FirstPushSetsUpstreamTracking) | |
| BOOST_AUTO_TEST_CASE (Push_RefusesOnADetachedHead) | |
| BOOST_AUTO_TEST_CASE (Push_ReportsNonFastForwardWhenRemoteIsAhead) | |
| BOOST_AUTO_TEST_CASE (Push_ReportsErrorWhenRemoteRefusesTheUpdate) | |
| BOOST_AUTO_TEST_CASE (PerformPull_RebaseConflictLeavesRepositoryAsItWas) | |
| BOOST_AUTO_TEST_CASE (PerformPull_FastForwardFollowsConfiguredUpstreamBranch) | |
| BOOST_AUTO_TEST_CASE (PerformPull_FastForwardRollsBackWhenBranchCannotMove) | |
| BOOST_AUTO_TEST_CASE (PerformPull_RollbackKeepsAnUntrackedDirectoryItCannotIdentify) | |
| BOOST_AUTO_TEST_CASE (PerformPull_AdoptRemoteHistoryLeavesUnbornBranchOnFailedCheckout) | |
| BOOST_AUTO_TEST_CASE (PerformPull_ExplainsWhenActionLockHeld) | |
| BOOST_AUTO_TEST_CASE (PerformPull_NamesUntrackedFileBlockingFastForward) | |
| BOOST_AUTO_TEST_CASE (PerformPull_NamesUntrackedFileBlockingMerge) | |
| BOOST_AUTO_TEST_CASE (PerformPull_UnbornBranchAdoptsRemoteHistory) | |
| BOOST_AUTO_TEST_CASE (AbandonOperation_ClearsInterruptedMerge) | |
| BOOST_AUTO_TEST_CASE (AbandonOperation_KeepsWorkTheOperationDidNotTouch) | |
| BOOST_AUTO_TEST_CASE (AbandonOperation_RefusesDuringABisect) | |
| BOOST_AUTO_TEST_CASE (AbandonOperation_RefusesAnInteractiveRebaseInOurWords) | |
| BOOST_AUTO_TEST_CASE (AbandonOperation_ClearsInterruptedRebase) | |
| BOOST_AUTO_TEST_CASE (PerformPull_FastForwardRefusesOverDirtyTrackedFile) | |
| BOOST_AUTO_TEST_CASE (DiscardChangesRestoresOnlyTheGivenPaths) | |
| BOOST_AUTO_TEST_CASE (DiscardChangesMatchesPathsLiterally) | |
| BOOST_AUTO_TEST_CASE (GetFileStatusMatchesPathspecLiterally) | |
| BOOST_AUTO_TEST_CASE (HasUpstreamCommitsSeesTheRemoteMoveOn) | |
| BOOST_AUTO_TEST_CASE (Commit_RefusesConflictedRepository) | |
| BOOST_AUTO_TEST_CASE (DiscardChangesDropsStagedEntryForNeverCommittedFile) | |
| BOOST_AUTO_TEST_CASE (BusyOperationDoesNotConsumeAnotherCancellation) | |
| BOOST_AUTO_TEST_CASE (Clone_CancelFromProgressReporterStopsTheClone) | |
| BOOST_AUTO_TEST_CASE (CancelRequestedWhileQueuedAbortsTransfer) | |
| BOOST_AUTO_TEST_CASE (ShutdownRequestAbortsAnOperationThatStartsAfterIt) | |
| BOOST_AUTO_TEST_CASE (Amend_MessageOnlyRewritesHeadKeepsTree) | |
| BOOST_AUTO_TEST_CASE (Amend_StagedFileChangesTreeAndKeepsParent) | |
| BOOST_AUTO_TEST_CASE (Amend_UnbornBranchReturnsError) | |
| BOOST_AUTO_TEST_CASE (SetupRemote_PreservesSshSchemePortAndUsername) | |
| BOOST_AUTO_TEST_CASE (SetupRemote_UpdatesExistingOriginWithScpAddress) | |
| BOOST_AUTO_TEST_CASE (SetupRemote_ExtractsHttpCredentialsWithoutPersistingThem) | |
| BOOST_AUTO_TEST_CASE (SetupRemote_KeepsSeparateHttpCredentialsForImmediateFetch) | |
| BOOST_AUTO_TEST_CASE (InitializeRepository_SeedsGitignoreWithKicadEntries) | |
| BOOST_AUTO_TEST_CASE (InitializeRepository_LeavesExistingGitignoreUntouched) | |
| BOOST_AUTO_TEST_CASE (InitializeRepository_LeavesEmptyGitignoreEmpty) | |
| static wxString | seedProjectFile (const wxString &aDir) |
| BOOST_AUTO_TEST_CASE (ProjectGitCommon_LazyCreateAttachRelease) | |
| BOOST_AUTO_TEST_CASE (ProjectGitCommon_ReleaseSkipsFreeWhenBackendGone) | |
| BOOST_AUTO_TEST_CASE (ProjectGitCommon_AttachOutsideRepositoryFails) | |
| BOOST_AUTO_TEST_CASE (ProjectGitCommon_AttachHonorsDisabledSetting) | |
| BOOST_AUTO_TEST_CASE (ProjectGitCommon_ReleaseDefersFreeWhileActionMutexHeld) | |
| BOOST_AUTO_TEST_CASE (CommitKeepsAPathThatIsNotARegularFile) | |
| BOOST_AUTO_TEST_CASE (IsTransientGitFile_HandlesDosPaths) | |
| BOOST_AUTO_TEST_CASE (BuildGitChangeEntries_KeepsTrackedAndStagedTransientFiles) | |
| BOOST_AUTO_TEST_CASE (WriteTreeToDir_MaterializesSubdirectoryFiles) | |
| BOOST_AUTO_TEST_CASE (MergeConflictRoundTrip) | |
| BOOST_AUTO_TEST_CASE (MergeConflictFinishesWithAnUntrackedFilePresent) | |
| BOOST_AUTO_TEST_CASE (MergeConflictRenameTakeTheirsLandsOnNewPath) | |
| BOOST_AUTO_TEST_CASE (Amend_KeepsFilesAlreadyInCommit) | |
| BOOST_AUTO_TEST_CASE (SwitchToBranch_RefusesARemoteBranch) | |
| BOOST_AUTO_TEST_CASE (SwitchToBranch_ReportsConflictOverLocalChanges) | |
| BOOST_AUTO_TEST_CASE (SwitchToBranch_ReportsConflictOverUntrackedCollision) | |
| BOOST_AUTO_TEST_CASE (Commit_RecordsDeletedFile) | |
| BOOST_AUTO_TEST_CASE (Commit_PreservesIndexEntriesOfUnselectedFiles) | |
| BOOST_AUTO_TEST_CASE (Commit_HandlesNonAsciiPaths) | |
| BOOST_AUTO_TEST_CASE (Commit_DoesNotDamageIndexWhileAnotherProcessHoldsTheLock) | |
| BOOST_AUTO_TEST_CASE (Amend_KeepsStagingWrittenByAnotherProcess) | |
| BOOST_AUTO_TEST_CASE (Commit_KeepsStagingWrittenByAnotherProcess) | |
| BOOST_AUTO_TEST_CASE (Commit_IgnoresContentStagedElsewhere) | |
| BOOST_AUTO_TEST_CASE (RestoreVersionRoundTrip) | |
| BOOST_AUTO_TEST_CASE (RestoreScopesToProjectDirectory) | |
| BOOST_AUTO_TEST_CASE (RestoreRefusesUnknownOrOutsideProject) | |
| BOOST_AUTO_TEST_CASE (RestoreRefusesUntrackedCollision) | |
| BOOST_AUTO_TEST_CASE (MergeConflictKeepsDeletion) | |
| BOOST_AUTO_TEST_CASE (WriteTreeToDir_LeavesIndexUntouched) | |
Variables | |
| static const char * | TEST_AUTHOR_NAME = "Test Author" |
| static const char * | TEST_AUTHOR_EMAIL = "[email protected]" |
Regression tests for LIBGIT_BACKEND, KIGIT_COMMON, GIT_INIT_HANDLER, GIT_PULL_HANDLER, GIT_PUSH_HANDLER, GIT_COMMIT_HANDLER focused on the recent Git integration bug fixes and the Amend Last Commit feature.
Definition in file test_libgit_backend.cpp.
| BOOST_AUTO_TEST_CASE | ( | AbandonOperation_ClearsInterruptedMerge | ) |
Definition at line 1299 of file test_libgit_backend.cpp.
References KIGIT_COMMON::AbandonOperation(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), git_repository, index, KIGIT_COMMON::IsOperationInProgress(), Merge, None, and KIGIT_COMMON::OperationInProgress().
| BOOST_AUTO_TEST_CASE | ( | AbandonOperation_ClearsInterruptedRebase | ) |
Definition at line 1520 of file test_libgit_backend.cpp.
References KIGIT_COMMON::AbandonOperation(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), and git_repository.
| BOOST_AUTO_TEST_CASE | ( | AbandonOperation_KeepsWorkTheOperationDidNotTouch | ) |
Definition at line 1360 of file test_libgit_backend.cpp.
References KIGIT_COMMON::AbandonOperation(), BOOST_CHECK_EQUAL(), git_repository, index, and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | AbandonOperation_RefusesAnInteractiveRebaseInOurWords | ) |
Definition at line 1473 of file test_libgit_backend.cpp.
References KIGIT_COMMON::AbandonOperation(), BOOST_REQUIRE(), git_repository, name, and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | AbandonOperation_RefusesDuringABisect | ) |
Definition at line 1434 of file test_libgit_backend.cpp.
References KIGIT_COMMON::AbandonOperation(), git_repository, and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | Amend_KeepsFilesAlreadyInCommit | ) |
Definition at line 3136 of file test_libgit_backend.cpp.
References BOOST_REQUIRE(), git_repository, GIT_COMMIT_HANDLER::PerformAmend(), Success, TEST_AUTHOR_EMAIL, and TEST_AUTHOR_NAME.
| BOOST_AUTO_TEST_CASE | ( | Amend_KeepsStagingWrittenByAnotherProcess | ) |
Definition at line 3652 of file test_libgit_backend.cpp.
References BOOST_REQUIRE(), KIGIT_ERRORS::GetErrorString(), git_repository, GIT_COMMIT_HANDLER::PerformAmend(), result, Success, TEST_AUTHOR_EMAIL, TEST_AUTHOR_NAME, and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | Amend_MessageOnlyRewritesHeadKeepsTree | ) |
Definition at line 2101 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), git_repository, GIT_COMMIT_HANDLER::PerformAmend(), result, Success, TEST_AUTHOR_EMAIL, and TEST_AUTHOR_NAME.
| BOOST_AUTO_TEST_CASE | ( | Amend_StagedFileChangesTreeAndKeepsParent | ) |
Definition at line 2143 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), git_repository, GIT_COMMIT_HANDLER::PerformAmend(), result, Success, TEST_AUTHOR_EMAIL, and TEST_AUTHOR_NAME.
| BOOST_AUTO_TEST_CASE | ( | Amend_UnbornBranchReturnsError | ) |
Definition at line 2199 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), Error, KIGIT_ERRORS::GetErrorString(), git_repository, GIT_COMMIT_HANDLER::PerformAmend(), result, TEST_AUTHOR_EMAIL, and TEST_AUTHOR_NAME.
| BOOST_AUTO_TEST_CASE | ( | BuildGitChangeEntries_KeepsTrackedAndStagedTransientFiles | ) |
Definition at line 2704 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL_COLLECTIONS(), BOOST_REQUIRE(), BuildGitChangeEntries(), KI_TEST::CommitAllGitFiles(), expected, index, KIGIT_COMMON::LockAction(), path, and KI_TEST::WriteGitFile().
| BOOST_AUTO_TEST_CASE | ( | BusyOperationDoesNotConsumeAnotherCancellation | ) |
Definition at line 1916 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), Busy, KIGIT_REPO_MIXIN::CancelToken(), KIGIT_COMMON::GetRecentCommits(), git_repository, KIGIT_REPO_MIXIN::IsThisOperationCancelled(), KIGIT_COMMON::LockAction(), and GIT_PUSH_HANDLER::PerformPush().
| BOOST_AUTO_TEST_CASE | ( | CancelRequestedWhileQueuedAbortsTransfer | ) |
Definition at line 2039 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), Error, git_repository, KIGIT_COMMON::IsShuttingDown(), KIGIT_REPO_MIXIN::IsThisOperationCancelled(), KIGIT_COMMON::NewCancelToken(), GIT_PULL_HANDLER::PerformFetch(), GIT_PUSH_HANDLER::PerformPush(), and KIGIT_REPO_MIXIN::SetCancelToken().
| BOOST_AUTO_TEST_CASE | ( | Clone_CancelFromProgressReporterStopsTheClone | ) |
Definition at line 2006 of file test_libgit_backend.cpp.
References KIGIT_COMMON::GetRepo(), KIGIT_REPO_MIXIN::IsThisOperationCancelled(), GIT_CLONE_HANDLER::PerformClone(), reporter, GIT_CLONE_HANDLER::SetClonePath(), GIT_PROGRESS::SetProgressReporter(), GIT_CLONE_HANDLER::SetRemote(), KIGIT_COMMON::SetRepo(), and CLONE_CANCEL_REPORTER::Ticks().
| BOOST_AUTO_TEST_CASE | ( | Commit_DoesNotDamageIndexWhileAnotherProcessHoldsTheLock | ) |
Definition at line 3580 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_ERRORS::GetErrorString(), git_repository, GIT_COMMIT_HANDLER::PerformCommit(), result, SuccessIndexStale, TEST_AUTHOR_EMAIL, TEST_AUTHOR_NAME, and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | Commit_HandlesNonAsciiPaths | ) |
Definition at line 3502 of file test_libgit_backend.cpp.
References KIGIT_ERRORS::GetErrorString(), git_repository, GIT_COMMIT_HANDLER::PerformAmend(), GIT_COMMIT_HANDLER::PerformCommit(), result, Success, TEST_AUTHOR_EMAIL, TEST_AUTHOR_NAME, and KI_TEST::WriteGitFile().
| BOOST_AUTO_TEST_CASE | ( | Commit_IgnoresContentStagedElsewhere | ) |
Definition at line 3793 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_ERRORS::GetErrorString(), git_repository, index, GIT_COMMIT_HANDLER::PerformCommit(), result, Success, TEST_AUTHOR_EMAIL, TEST_AUTHOR_NAME, and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | Commit_KeepsStagingWrittenByAnotherProcess | ) |
Definition at line 3732 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_ERRORS::GetErrorString(), git_repository, GIT_COMMIT_HANDLER::PerformCommit(), result, Success, TEST_AUTHOR_EMAIL, TEST_AUTHOR_NAME, and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | Commit_PreservesIndexEntriesOfUnselectedFiles | ) |
Definition at line 3351 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), Error, KIGIT_ERRORS::GetErrorString(), git_repository, index, GIT_COMMIT_HANDLER::PerformAmend(), GIT_COMMIT_HANDLER::PerformCommit(), result, Success, TEST_AUTHOR_EMAIL, TEST_AUTHOR_NAME, and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | Commit_RecordsDeletedFile | ) |
Definition at line 3313 of file test_libgit_backend.cpp.
References KIGIT_ERRORS::GetErrorString(), git_repository, GIT_COMMIT_HANDLER::PerformCommit(), result, Success, TEST_AUTHOR_EMAIL, and TEST_AUTHOR_NAME.
| BOOST_AUTO_TEST_CASE | ( | Commit_RefusesConflictedRepository | ) |
Definition at line 1798 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), Error, KIGIT_ERRORS::GetErrorString(), git_repository, index, GIT_COMMIT_HANDLER::PerformAmend(), GIT_COMMIT_HANDLER::PerformCommit(), TEST_AUTHOR_EMAIL, TEST_AUTHOR_NAME, and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | CommitKeepsAPathThatIsNotARegularFile | ) |
Definition at line 2643 of file test_libgit_backend.cpp.
References BOOST_REQUIRE(), git_repository, GIT_COMMIT_HANDLER::PerformCommit(), Success, and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | DiscardChangesDropsStagedEntryForNeverCommittedFile | ) |
Definition at line 1882 of file test_libgit_backend.cpp.
References KIGIT_COMMON::DiscardChanges(), git_repository, KIGIT_COMMON::HasUncommittedTrackedChanges(), index, and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | DiscardChangesMatchesPathsLiterally | ) |
Definition at line 1674 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_COMMON::DiscardChanges(), and git_repository.
| BOOST_AUTO_TEST_CASE | ( | DiscardChangesRestoresOnlyTheGivenPaths | ) |
Definition at line 1626 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_COMMON::DiscardChanges(), git_repository, and KIGIT_COMMON::IsPathInHead().
| BOOST_AUTO_TEST_CASE | ( | FetchHeadMarksAtMostOneBranchToMerge | ) |
Definition at line 293 of file test_libgit_backend.cpp.
References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_ERRORS::GetErrorString(), git_repository, name, and GIT_PULL_HANDLER::PerformFetch().
| BOOST_AUTO_TEST_CASE | ( | GetDifferentFiles_DifferentTreeAmendKeepsAheadFile | ) |
Definition at line 544 of file test_libgit_backend.cpp.
References KIGIT_COMMON::GetDifferentFiles(), and git_repository.
| BOOST_AUTO_TEST_CASE | ( | GetDifferentFiles_SameTreeAmendHidesAheadFiles | ) |
Definition at line 485 of file test_libgit_backend.cpp.
References KIGIT_COMMON::GetDifferentFiles(), git_repository, TEST_AUTHOR_EMAIL, and TEST_AUTHOR_NAME.
| BOOST_AUTO_TEST_CASE | ( | GetFileStatusMatchesPathspecLiterally | ) |
Definition at line 1715 of file test_libgit_backend.cpp.
References GIT_STATUS_HANDLER::GetFileStatus(), git_repository, and path.
| BOOST_AUTO_TEST_CASE | ( | HasUpstreamCommitsSeesTheRemoteMoveOn | ) |
Definition at line 1758 of file test_libgit_backend.cpp.
References KIGIT_COMMON::AddRemote(), BOOST_REQUIRE(), git_repository, and KIGIT_COMMON::HasUpstreamCommits().
| BOOST_AUTO_TEST_CASE | ( | InitializeRepository_LeavesEmptyGitignoreEmpty | ) |
Definition at line 2434 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), GIT_INIT_HANDLER::InitializeRepository(), and Success.
| BOOST_AUTO_TEST_CASE | ( | InitializeRepository_LeavesExistingGitignoreUntouched | ) |
Definition at line 2399 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), GIT_INIT_HANDLER::InitializeRepository(), result, and Success.
| BOOST_AUTO_TEST_CASE | ( | InitializeRepository_SeedsGitignoreWithKicadEntries | ) |
Definition at line 2323 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_TEST_CONTEXT(), KIGIT_COMMON::GetRepo(), GIT_INIT_HANDLER::InitializeRepository(), KIGIT::PROJECT_GIT_UTILS::IsTransientGitFile(), path, result, KIGIT_COMMON::SetRepo(), Success, and KI_TEST::WriteGitFile().
| BOOST_AUTO_TEST_CASE | ( | IsTransientGitFile_HandlesDosPaths | ) |
Definition at line 2689 of file test_libgit_backend.cpp.
| BOOST_AUTO_TEST_CASE | ( | IsWithinProjectPath_ScopesToProjectDirectory | ) |
Definition at line 450 of file test_libgit_backend.cpp.
References KIGIT::PROJECT_GIT_UTILS::IsWithinProjectPath(), and project.
| BOOST_AUTO_TEST_CASE | ( | MergeConflictFinishesWithAnUntrackedFilePresent | ) |
Definition at line 3000 of file test_libgit_backend.cpp.
References copy, KIGIT_COMMON::CreateMergedCommit(), KIGIT_COMMON::GetMergeConflicts(), and git_repository.
| BOOST_AUTO_TEST_CASE | ( | MergeConflictKeepsDeletion | ) |
Definition at line 4102 of file test_libgit_backend.cpp.
References KIGIT_COMMON::CreateMergedCommit(), KIGIT_COMMON::GetMergeConflicts(), git_repository, index, TEST_AUTHOR_EMAIL, and TEST_AUTHOR_NAME.
| BOOST_AUTO_TEST_CASE | ( | MergeConflictRenameTakeTheirsLandsOnNewPath | ) |
Definition at line 3045 of file test_libgit_backend.cpp.
References KIGIT_COMMON::CreateMergedCommit(), KIGIT_COMMON::GetMergeConflicts(), git_repository, Success, and KIGIT_ERROR_MESSAGE::summary.
| BOOST_AUTO_TEST_CASE | ( | MergeConflictRoundTrip | ) |
Definition at line 2800 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_COMMON::CreateMergedCommit(), FailedCleanly, KIGIT_COMMON::GetMergeConflicts(), git_repository, and path.
| BOOST_AUTO_TEST_CASE | ( | PerformPull_AdoptRemoteHistoryLeavesUnbornBranchOnFailedCheckout | ) |
Definition at line 1079 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), collide(), FastForward, git_repository, GIT_PULL_HANDLER::PerformPull(), result, and Success.
| BOOST_AUTO_TEST_CASE | ( | PerformPull_ExplainsWhenActionLockHeld | ) |
Definition at line 1133 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), Error, KIGIT_ERRORS::GetErrorStrings(), git_repository, KIGIT_COMMON::LockAction(), GIT_PULL_HANDLER::PerformPull(), and result.
| BOOST_AUTO_TEST_CASE | ( | PerformPull_FastForwardFollowsConfiguredUpstreamBranch | ) |
Definition at line 857 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), FastForward, git_repository, GIT_PULL_HANDLER::PerformPull(), and result.
| BOOST_AUTO_TEST_CASE | ( | PerformPull_FastForwardRefusesOverDirtyTrackedFile | ) |
Definition at line 1572 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), DirtyWorkdir, git_repository, GIT_PULL_HANDLER::PerformPull(), and result.
| BOOST_AUTO_TEST_CASE | ( | PerformPull_FastForwardRollsBackWhenBranchCannotMove | ) |
Definition at line 917 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), Error, git_repository, GIT_PULL_HANDLER::PerformPull(), and result.
| BOOST_AUTO_TEST_CASE | ( | PerformPull_NamesUntrackedFileBlockingFastForward | ) |
Definition at line 1163 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), DirtyWorkdir, KIGIT_ERRORS::GetErrorString(), git_repository, GIT_PULL_HANDLER::PerformPull(), and result.
| BOOST_AUTO_TEST_CASE | ( | PerformPull_NamesUntrackedFileBlockingMerge | ) |
Definition at line 1218 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), DirtyWorkdir, KIGIT_ERRORS::GetErrorString(), git_repository, GIT_PULL_HANDLER::PerformPull(), and result.
| BOOST_AUTO_TEST_CASE | ( | PerformPull_NoUpstreamConfig_FallbackSucceedsAndWritesUpstream | ) |
Definition at line 577 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), FastForward, KIGIT_ERRORS::GetErrorString(), git_repository, GIT_PULL_HANDLER::PerformPull(), result, Success, and UpToDate.
| BOOST_AUTO_TEST_CASE | ( | PerformPull_RebaseConfigReplaysLocalCommit | ) |
With pull.rebase set, a pull over diverged history must replay the local commit onto the remote one and leave no rebase in progress.
Definition at line 611 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_ERRORS::GetErrorString(), git_repository, GIT_PULL_HANDLER::PerformPull(), GIT_PUSH_HANDLER::PerformPush(), result, and Success.
| BOOST_AUTO_TEST_CASE | ( | PerformPull_RebaseConflictLeavesRepositoryAsItWas | ) |
Definition at line 802 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), Conflict, git_repository, GIT_PULL_HANDLER::PerformPull(), and result.
| BOOST_AUTO_TEST_CASE | ( | PerformPull_RefusesACommitThatBringsGitLfs | ) |
Definition at line 378 of file test_libgit_backend.cpp.
References BOOST_REQUIRE(), FastForward, KIGIT_ERRORS::GetErrorString(), git_repository, GIT_PULL_HANDLER::PerformPull(), result, and Success.
| BOOST_AUTO_TEST_CASE | ( | PerformPull_RollbackKeepsAnUntrackedDirectoryItCannotIdentify | ) |
Definition at line 1018 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), git_repository, GIT_PULL_HANDLER::PerformPull(), and result.
| BOOST_AUTO_TEST_CASE | ( | PerformPull_UnbornBranchAdoptsRemoteHistory | ) |
Definition at line 1269 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), FastForward, git_repository, GIT_PULL_HANDLER::PerformPull(), and result.
| BOOST_AUTO_TEST_CASE | ( | ProjectGitCommon_AttachHonorsDisabledSetting | ) |
Definition at line 2570 of file test_libgit_backend.cpp.
References SETTINGS_MANAGER::GetProject(), SETTINGS_MANAGER::LoadProject(), project, and seedProjectFile().
| BOOST_AUTO_TEST_CASE | ( | ProjectGitCommon_AttachOutsideRepositoryFails | ) |
Definition at line 2548 of file test_libgit_backend.cpp.
References SETTINGS_MANAGER::GetProject(), SETTINGS_MANAGER::LoadProject(), project, and seedProjectFile().
| BOOST_AUTO_TEST_CASE | ( | ProjectGitCommon_LazyCreateAttachRelease | ) |
Definition at line 2476 of file test_libgit_backend.cpp.
References SETTINGS_MANAGER::GetProject(), git_repository, SETTINGS_MANAGER::LoadProject(), project, seedProjectFile(), and SETTINGS_MANAGER::UnloadProject().
| BOOST_AUTO_TEST_CASE | ( | ProjectGitCommon_ReleaseDefersFreeWhileActionMutexHeld | ) |
Definition at line 2596 of file test_libgit_backend.cpp.
References GetGitBackend(), SETTINGS_MANAGER::GetProject(), SETTINGS_MANAGER::LoadProject(), project, and seedProjectFile().
| BOOST_AUTO_TEST_CASE | ( | ProjectGitCommon_ReleaseSkipsFreeWhenBackendGone | ) |
Definition at line 2515 of file test_libgit_backend.cpp.
References GetGitBackend(), SETTINGS_MANAGER::GetProject(), git_repository, SETTINGS_MANAGER::LoadProject(), project, seedProjectFile(), and SetGitBackend().
| BOOST_AUTO_TEST_CASE | ( | Push_FirstPushSetsUpstreamTracking | ) |
Definition at line 659 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), git_repository, GIT_PUSH_HANDLER::PerformPush(), result, and Success.
| BOOST_AUTO_TEST_CASE | ( | Push_RefusesOnADetachedHead | ) |
Definition at line 688 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), Error, KIGIT_ERRORS::GetErrorString(), git_repository, and GIT_PUSH_HANDLER::PerformPush().
| BOOST_AUTO_TEST_CASE | ( | Push_ReportsErrorWhenRemoteRefusesTheUpdate | ) |
Definition at line 754 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), Error, KIGIT_ERRORS::GetErrorStrings(), git_repository, GIT_PUSH_HANDLER::PerformPush(), and result.
| BOOST_AUTO_TEST_CASE | ( | Push_ReportsNonFastForwardWhenRemoteIsAhead | ) |
Definition at line 715 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), git_repository, NonFastForward, GIT_PUSH_HANDLER::PerformPush(), and result.
| BOOST_AUTO_TEST_CASE | ( | PushProgressStopsWhenTheOperationIsCancelled | ) |
Definition at line 429 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_REPO_MIXIN::CancelThisOperation(), git_repository, and push_transfer_progress_cb().
| BOOST_AUTO_TEST_CASE | ( | RestoreRefusesUnknownOrOutsideProject | ) |
Definition at line 3973 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_ERROR_MESSAGE::details, Error, and KIGIT_COMMON::RestoreVersion().
| BOOST_AUTO_TEST_CASE | ( | RestoreRefusesUntrackedCollision | ) |
Definition at line 4017 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), Dirty, git_repository, index, Restored, KIGIT_COMMON::RestoreVersion(), KIGIT_ERROR_MESSAGE::summary, TEST_AUTHOR_EMAIL, and TEST_AUTHOR_NAME.
| BOOST_AUTO_TEST_CASE | ( | RestoreScopesToProjectDirectory | ) |
Definition at line 3914 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), Error, Restored, KIGIT_COMMON::RestoreVersion(), and KIGIT_ERROR_MESSAGE::summary.
| BOOST_AUTO_TEST_CASE | ( | RestoreVersionRoundTrip | ) |
Definition at line 3855 of file test_libgit_backend.cpp.
References AlreadyCurrent, BOOST_CHECK_EQUAL(), Dirty, git_repository, Restored, KIGIT_COMMON::RestoreVersion(), and KIGIT_ERROR_MESSAGE::summary.
| BOOST_AUTO_TEST_CASE | ( | SetupRemote_ExtractsHttpCredentialsWithoutPersistingThem | ) |
Definition at line 2269 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), config, KIGIT_COMMON::GetConnType(), KIGIT_COMMON::GetPassword(), KIGIT_COMMON::GetRemote(), KIGIT_COMMON::GetUsername(), KIGIT_COMMON::GIT_CONN_HTTPS, GIT_INIT_HANDLER::SetupRemote(), and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | SetupRemote_KeepsSeparateHttpCredentialsForImmediateFetch | ) |
Definition at line 2300 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), config, KIGIT_COMMON::GetPassword(), KIGIT_COMMON::GetRemote(), KIGIT_COMMON::GetUsername(), KIGIT_COMMON::GIT_CONN_HTTPS, GIT_INIT_HANDLER::SetupRemote(), and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | SetupRemote_PreservesSshSchemePortAndUsername | ) |
Definition at line 2222 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), config, KIGIT_COMMON::GetConnType(), KIGIT_COMMON::GetPassword(), KIGIT_COMMON::GetRemote(), KIGIT_COMMON::GetUsername(), KIGIT_COMMON::GIT_CONN_SSH, GIT_INIT_HANDLER::SetupRemote(), and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | SetupRemote_UpdatesExistingOriginWithScpAddress | ) |
Definition at line 2246 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), config, KIGIT_COMMON::GetConnType(), KIGIT_COMMON::GetRemote(), KIGIT_COMMON::GetUsername(), KIGIT_COMMON::GIT_CONN_SSH, GIT_INIT_HANDLER::SetupRemote(), and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | ShutdownRequestAbortsAnOperationThatStartsAfterIt | ) |
Definition at line 2074 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), Error, git_repository, KIGIT_COMMON::IsShuttingDown(), GIT_PULL_HANDLER::PerformFetch(), GIT_PUSH_HANDLER::PerformPush(), result, and KIGIT_COMMON::SetShuttingDown().
| BOOST_AUTO_TEST_CASE | ( | SwitchToBranch_RefusesARemoteBranch | ) |
Definition at line 3179 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), Error, KIGIT_ERRORS::GetErrorString(), git_repository, GIT_BRANCH_HANDLER::SwitchToBranch(), and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | SwitchToBranch_ReportsConflictOverLocalChanges | ) |
Definition at line 3224 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), Conflict, git_repository, GIT_BRANCH_HANDLER::SwitchToBranch(), and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | SwitchToBranch_ReportsConflictOverUntrackedCollision | ) |
Definition at line 3269 of file test_libgit_backend.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), Conflict, git_repository, Success, GIT_BRANCH_HANDLER::SwitchToBranch(), and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | WriteTreeToDir_LeavesIndexUntouched | ) |
Definition at line 4191 of file test_libgit_backend.cpp.
References BOOST_REQUIRE(), git_repository, index, and KIGIT::PROJECT_GIT_UTILS::WriteTreeToDir().
| BOOST_AUTO_TEST_CASE | ( | WriteTreeToDir_MaterializesSubdirectoryFiles | ) |
Definition at line 2769 of file test_libgit_backend.cpp.
References BOOST_REQUIRE(), git_repository, and KIGIT::PROJECT_GIT_UTILS::WriteTreeToDir().
|
static |
Definition at line 2462 of file test_libgit_backend.cpp.
References path.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 68 of file test_libgit_backend.cpp.
Referenced by GIT_BACKEND_FIXTURE::createDetachedCommit(), and GIT_BACKEND_FIXTURE::initRepoWithCommit().
|
static |
Definition at line 67 of file test_libgit_backend.cpp.
Referenced by GIT_BACKEND_FIXTURE::createDetachedCommit(), and GIT_BACKEND_FIXTURE::initRepoWithCommit().