diff --git a/system/t08_db/CleanupDB6Test_gold b/system/t08_db/CleanupDB6Test_gold new file mode 100644 index 00000000..11a05b46 --- /dev/null +++ b/system/t08_db/CleanupDB6Test_gold @@ -0,0 +1,6 @@ +Loading mirrors, local repos and snapshots... +Loading list of all packages... +Deleting unreferenced packages (0)... +Building list of files referenced by packages... +Building list of files in package pool... +Deleting unreferenced files (0)... diff --git a/system/t08_db/CleanupDB7Test_gold b/system/t08_db/CleanupDB7Test_gold new file mode 100644 index 00000000..11a05b46 --- /dev/null +++ b/system/t08_db/CleanupDB7Test_gold @@ -0,0 +1,6 @@ +Loading mirrors, local repos and snapshots... +Loading list of all packages... +Deleting unreferenced packages (0)... +Building list of files referenced by packages... +Building list of files in package pool... +Deleting unreferenced files (0)... diff --git a/system/t08_db/cleanup.py b/system/t08_db/cleanup.py index d0901f0e..ba5d3e75 100644 --- a/system/t08_db/cleanup.py +++ b/system/t08_db/cleanup.py @@ -60,3 +60,35 @@ class CleanupDB5Test(BaseTest): "aptly mirror drop gnuplot-maverick", ] runCmd = "aptly db cleanup" + + +class CleanupDB6Test(BaseTest): + """ + cleanup db: db is full + """ + fixtureDB = True + fixturePoolCopy = True + runCmd = "aptly db cleanup" + + +class CleanupDB7Test(BaseTest): + """ + cleanup db: local repos + """ + fixtureCmds = [ + "aptly repo create local-repo", + "aptly repo add local-repo ${files}", + ] + runCmd = "aptly db cleanup" + +# TODO: when repo drop is added +# class CleanupDB8Test(BaseTest): +# """ +# cleanup db: local repos dropped +# """ +# fixtureCmds = [ +# "aptly repo create local-repo", +# "aptly repo add local-repo ${files}", +# "aptly repo drop local-repo", +# ] +# runCmd = "aptly db cleanup"