summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add CI testing for raw filesChris Shepherd2022-03-296-0/+200
| | | | | | | | | | | | Created two tests for the creation of appropriate local git repos from folders of raw files. 1. One raw file. Verify that the desired form of the .lorry file creates a corresponding git repo with the correct relative paths. 2. Multiple raw files. Verify all the above, plus the additon of all raw files and the updating of the realtive paths upon changes of the .lorry file.
* Fix failing make tarball testKyle Mckay2021-12-291-2/+3
| | | | | Use tarball-dest since test is checking creation works, not default location behaviour
* Add test to verify hard link supportBen Brown2021-11-242-0/+72
|
* Add test for ignoring of global pax headerBen Brown2021-11-173-0/+73
|
* tests: Add test of incremental cvs lorryingBen Hutchings2020-09-173-0/+195
| | | | | This currently fails because git cvsimport doesn't really work with bare repositories.
* lorry: Make cvsps store cache inside working git repositoryBen Hutchings2020-09-172-0/+2
| | | | | | | | | git cvsimport uses cvsps, which creates state files under ~/.cvsps. This means the cache may become inconsistent with the git repository. I observed this to happen when adding a second test case for cvs conversion. Set $HOME to the git directory so that this doesn't happen.
* tests: Do not hide lorry errorsBen Hutchings2020-09-1710-12/+12
| | | | | Redirecting lorry's stderr to /dev/null just makes test failures harder to debug. Only do that when we expect it to fail.
* tests: Clear out $DATADIR after every testBen Hutchings2020-09-169-168/+7
| | | | | | | | | | Some tests have a teardown script that removes their temporary files, but most do not. To avoid interference or dependencies between tests, use a global teardown script that removes almost everything in $DATADIR. It excludes git-upstream, which is intentionally set up once and read by multiple tests.
* tests: Verify that working repos for cvs and svn mirroring are bareBen Hutchings2020-09-154-2/+75
| | | | | | | | | | These will currently fail: * gitify_cvs creates non-bare repositories * gitify_svn creates non-bare repositories and changes them to bare, but leaves ref-logs enabled Related to #12.
* tests: Check update counts in git-backup-on-error test casesBen Hutchings2020-08-104-0/+4
|
* tests: Add test case for migration of old-style working repositoriesBen Hutchings2020-08-104-0/+164
| | | | | Make sure migration of existing working directories to the A/B scheme works properly.
* tests: Add test case for update counts in the A/B schemeBen Hutchings2020-08-104-0/+158
|
* lorry: Crash-proof updates to working git repos with A/B switchingBen Hutchings2020-08-1012-92/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lorry currently updates a git repository in its working area like this: 1. Delete old backup and debug repositories 2. Copy active repository (git) to backup (git-pre-update) 3. Perform conversion in active repository 4. If conversion failed, restore the backup: 1. Copy active repository to debug (git-post-fail) 2. Delete active repository 3. Copy backup repository to active 5. If conversion succeeded: delete git-pre-update If step 3 or 4 is interrupted, for example because of a system reboot, the active repository may be left missing or broken. On the next update, the backup will be deleted. Replace this with the following process: 1. Look for repositories 'git-a' and 'git-b'. The one with a higher update count (or the only one that exists and has an update count file) is the active repository. The other is the the temporary repository. In case neither exists, 'git-a' is the temporary repository. 2. Delete old temporary repository, if it exists 3. Copy active repository, if it exists, to temporary repository (excluding the update count file) 4. Perform conversion in temporary repository 5. If conversion succeeded, make the temporary repository active by writing the new update count file 6. If conversion failed, move the temporary repository to debug as before We need to migrate the working state, so if there is a 'git' and no 'git-a', add an update count of 1 to 'git' and move it to 'git-a'. Also delete the old-style backup repository. Update test cases to expect the new filenames. lorry should now be crash-proof, in the sense that killing it at any point will leave the last successful update in place. However, an unclean system shutdown (e.g. kernel crash) that does not flush all writes to persistent storage may still result in the active repository being left broken. Closes: #8.
* lorry: Only log number of commits pruned from marks filesBen Hutchings2020-08-052-2/+3
| | | | | | | | | | Logging each pruned commit can result in very long logs for some repositories. This is a problem for Lorry Controller because job status updates result in copying the entire log and not just the new log lines. There's not much value in listing all the commit hashes, so log the number of commits instead. Update the test case accordingly.
* tests: Add a test case for unnamed heads in MercurialBen Hutchings2020-08-054-0/+137
| | | | | | Test that we can cope with conversion of unnamed heads now. Related to #7.
* tests: Add a test case for incremental conversion from MercurialBen Hutchings2020-08-055-0/+147
| | | | | Also add a teardown script for hg-single-commit so these two don't get in each other's way.
* tests: Fix flaky cvs-single-commit testBen Hutchings2020-07-221-0/+4
| | | | | | | | | | | | | | | | | The cvs-single-commit test actually involves two commits: one made by 'cvs init', and another by 'cvs commit'. Occasionally these commit appear in the wrong order in the git repository, apparently because they ended up with the same timestamp. This seems to be a similar issue to <https://bugs.launchpad.net/ubuntu/+source/cvs/+bug/12230>, which has a workaround (a 20 ms sleep after checkout). However, this issue is not readily reproducible - I had to use libfaketime to do it - and I can't tell whether that will work for us. Instead, add a 1 second sleep after checkout. Closes #6.
* Add copyright notices and years to several scriptsBen Hutchings2020-07-154-4/+4
| | | | | * lorry.gzip-importer was missing a copyright notice * Various changes were not included in the copyright dates
* Restore copyright dates before 2013Ben Hutchings2020-07-1528-28/+28
| | | | | | This mostly reverts commit 5f5435647ada "Update copyright notices", which changed all copyright dates to 2013. Most files were added in 2011 and 2012.
* Add support for Breezy (brz) as alternative Bazaar implementationBen Hutchings2020-07-091-0/+5
| | | | | | | | | | | | | | | | | | | | The original Bazaar implementation (bzr) only runs on Python 2, but there is a fork known as Breezy (brz) that has been ported to Python 3. To support environments without Python 2, allow using Breezy: * Add a setting 'bazaar-command' that specifies which command to run * Set the default based on a path search, preferring 'bzr' but using 'brz' if only 'brz' is found * Implement a similar fallback in the test setup for Bazaar import * Update README to mention Breezy as an alternative. The 'fastimport' extension is included in it rather than being a separate package. Closes #3.
* tests: Fix test failure with newer git versions that create more filesBen Hutchings2020-06-052-0/+4
| | | | | | When comparing the repository file list with the expected list, ignore objects/pack/pack-*.bitmap (created by default since 2.22) and objects/info/commit-graph (created by default since 2.24).
* Add extended headers ignored testRichard Ipsum2015-08-204-0/+74
| | | | | | | Any extended headers present (such as those created by bsd tar) should be ignored. Change-Id: Ic1c0831c349fc7192892fbf487427dac3b320366
* Fix expected output in tar-single-commit testRichard Ipsum2015-08-141-3/+3
| | | | Change-Id: I8158e53ff64e7ed68e469971b15ba78b0d5fef1c
* tests: Fix make-tarball testFrancisco Redondo Marchena2015-04-281-1/+1
| | | | | | | | Add a fake mirror-base-url-fetch for running make-tarball test. This was broken because if mirror-base-url-fetch is empty lorry avoids to create the bundle and the tar file. Change-Id: I606226fb26739a366641b8f3ac9c9969860abcb0
* Update tests and docs for obsolete fields in tarball importssam/tarball-obsolete-fieldsSam Thursfield2015-02-042-12/+0
| | | | | The 'compression' and 'strip' fields seem to have been obsolete since commit a7f8b1b63a97c66aea6f39342313d7a5b919cfa7 in 2012.
* Update copyright noticesrichardipsum/improve_backupsRichard Ipsum2013-12-1726-26/+26
|
* Add test: existing backup is removed by defaultRichard Ipsum2013-12-173-0/+111
|
* Add multi-backup tear down and single backup testRichard Ipsum2013-12-176-0/+202
|
* Modify lorry backup behaviour and rename testsRichard Ipsum2013-12-174-2/+2
|
* Fix git-backup-on-error testRichard Ipsum2013-12-112-0/+16
| | | | | | | This test didn't have the correct expected output. This commit corrects the expected output and amends the test so that it fails if there are no pack files in the test backup repo.
* Fix typo in hg testDaniel Silverstone2012-09-271-1/+1
|
* Merge branch 'danielsilverstone/all-repos-bare' of ↵Richard Maw2012-09-2414-47/+115
|\ | | | | | | | | | | | | git://git.baserock.org/baserock/lorry Includes a fixup of quoting uses of $SRCDIR, so it may include paths with spaces.
| * Alter repack so that we do a 'git gc' instead.danielsilverstone/all-repos-bareDaniel Silverstone2012-09-241-3/+3
| | | | | | | | | | | | | | | | | | | | Git has a garbage collection 'porcelain' command called 'gc' which does more than just repack the repository. Use that in preference to 'git repack' and also configure the repositories so that they don't use too much RAM whilst repacking. Also, we allow gitify_* routines to set self.needs_aggressive on their initial imports so that we aggressively repack the first clone.
| * Fix up Lorry to expect repositories to be bare.Daniel Silverstone2012-09-2414-50/+118
|/ | | | | | | | This patch makes Lorry always create bare repositories where it can (Note that it cannot for CVS imports) and to create tarballs of bare repositories (if not disabled) which will be more efficient than bundles for creation and cloning. We may be able to disable bundles later.
* Fix test case after message changesliw/names-with-slashesLars Wirzenius2012-08-312-5/+2
|
* Set $USER etc for CVS test setup scriptLars Wirzenius2012-08-281-0/+5
|
* Fix test case to be more deterministicLars Wirzenius2012-08-282-4/+12
|
* git-backup test: prevent bundling to reduce outputRichard Maw2012-05-302-5/+2
| | | | | | Changing from gitorious to gitano showed that it generates a bundle. This causes the test to produce different output, so is deemed a failure.
* lorry: force fetch from upstreamRichard Maw2012-05-241-1/+1
| | | | | As annoying as it is to have non-fast-forward commits, it is still a valid workflow, so it has to be allowed.
* tests: amend outputRichard Maw2012-05-241-1/+1
|
* tests: add test for keeping the repo on errorRichard Maw2012-03-284-0/+178
|
* lorry: use refspecs in lorry filesRichard Maw2012-03-132-4/+4
| | | | | | | | | | | If refspecs are listed, pass them to push_to_mirror_server, if not allow push_to_mirror_server to use its default refspecs Also fix test cases: - refs/tags/rc* is not a valid refspec, * can only substitute a whole directory - git-for-each-ref needs the whole ref path, master is not the same as refs/heads/master
* tests: add new test, use same setupRichard Maw2012-03-132-0/+52
| | | | | | | | Add a test for only pushing the refs specified. This checks whether the set of pushed refs is the same as those specified Also move no-pushspec-pushall.setup to setup_once as both pushspec tests share the same setup
* tests: add check for no pushspec behaviourRichard Maw2012-03-132-0/+97
| | | | If no push refspecs are given then every ref should be pushed
* Update test script comments.Jannis Pohlmann2012-02-203-3/+3
|
* Add basic tarball importing test, analog to the others.Jannis Pohlmann2012-02-203-0/+114
|
* Add a single commit, single file, single master branch test for SVN.Jannis Pohlmann2012-02-203-0/+112
|
* Update bzr/cvs/git/hg test scripts. Always use git for repo checks.Jannis Pohlmann2012-02-206-55/+52
|
* Drop unused line in the bzr-single-commit test script.Jannis Pohlmann2012-02-201-1/+0
|
* Add simple hg test. Needs hg-fast-export, which I don't have.Jannis Pohlmann2012-02-173-0/+95
| | | | This is why the test might be broken.