l.a.t.t.TestPublisher(TestPublisherBase) : class documentation

Part of lp.archivepublisher.tests.test_publisher View In Hierarchy

Testing Publisher behaviour.
Method assertDirtyPocketsContents Undocumented
Method assertReleaseContentsMatch Undocumented
Method parseRelease Undocumented
Method parseI18nIndex Undocumented
Method testInstantiate Publisher should be instantiatable
Method testPublishing Test the non-careful publishing procedure.
Method testDeletingPPA Test deleting a PPA
Method testDeletingPPAWithoutMetaData Undocumented
Method testDeletingPPAThatCannotHaveMetaData Undocumented
Method testDeletingPPARename Undocumented
Method testPublishPartner Test that a partner package is published to the right place.
Method testPartnerReleasePocketPublishing Test partner package RELEASE pocket publishing.
Method testPublishingSpecificDistroSeries Test the publishing procedure with the suite argument.
Method testPublishingSpecificPocket Test the publishing procedure with the suite argument.
Method testNonCarefulPublishing Test the non-careful publishing procedure.
Method testCarefulPublishing Test the careful publishing procedure.
Method testPublishingOnlyConsidersOneArchive Publisher procedure should only consider the target archive.
Method testPublishingWorksForOtherArchives Publisher also works as expected for another archives.
Method testPublishingSkipsObsoleteFuturePrimarySeries Publisher skips OBSOLETE/FUTURE series in PRIMARY archives.
Method testPublishingConsidersObsoleteFuturePPASeries Publisher does not skip OBSOLETE/FUTURE series in PPA archives.
Method testPublisherBuilderFunctions Publisher can be initialized via provided helper function.
Method testPendingArchive Check Pending Archive Lookup.
Method testDeletingArchive Undocumented
Method testPendingArchiveWithReapableFiles Undocumented
Method testDirtySuitesArchive Undocumented
Method setupPPAArchiveIndexTest Undocumented
Method testPPAArchiveIndex Building Archive Indexes from PPA publications.
Method testPPAArchiveIndexLongDescriptionsFalseFeatureFlagDisabled Undocumented
Method testPPAArchiveIndexLongDescriptionsFalse Undocumented
Method testPPAArchiveIndexCompressors Undocumented
Method checkDirtyPockets Check dirty_pockets contents of a given publisher.
Method testDirtyingPocketsWithDeletedPackages Test that dirtying pockets with deleted packages works.
Method testDeletionDetectionRespectsAllowedSuites Check if the deletion detection mechanism respects allowed_suites.
Method testReleaseFile Test release file writing.
Method testReleaseFileForPPA Test release file writing for PPA
Method testReleaseFileForNamedPPA Undocumented
Method testReleaseFileForPartner Test Release file writing for Partner archives.
Method testReleaseFileForNotAutomaticBackports Undocumented
Method testReleaseFileForI18n Test Release file writing for translated package descriptions.
Method testReleaseFileForContents Test Release file writing for Contents files.
Method testReleaseFileForDEP11 Undocumented
Method testReleaseFileForCommandNotFound Undocumented
Method testReleaseFileTimestamps Undocumented
Method testReleaseFileWritingCreatesDirectories Undocumented
Method testCreateSeriesAliasesNoAlias createSeriesAliases has nothing to do by default.
Method testCreateSeriesAliasesChangesAlias createSeriesAliases tracks the latest published series.
Method testHtaccessForPrivatePPA Undocumented
Method testWriteSuiteI18n Test i18n/Index writing.
Method testWriteSuiteI18nMissingDirectory i18n/Index is not generated when the i18n directory is missing.
Method testWriteSuiteI18nEmptyDirectory i18n/Index is not generated when the i18n directory is empty.
Method testReadIndexFileHashesCompression Test compressed file handling in _readIndexFileHashes.
Method _checkCompressedFiles Assert that the various compressed versions of a file are equal.
Method _assertPublishesSeriesAlias Undocumented

Inherited from TestPublisherBase:

Method setUp Override cprov PPA distribution to 'ubuntutest'.

Inherited from TestNativePublishingBase (via TestPublisherBase):

Method __init__ Undocumented
Method tearDown Tear down blows the pool dirs away.
Method getPubSource Overrides SoyuzTestPublisher.getPubSource.
Method getPubBinaries Overrides SoyuzTestPublisher.getPubBinaries.
Method checkPublication Assert the publication has the given status.
Method checkPublications Assert the given publications have the given status.
Method checkPastDate Assert given date is older than 'now'.
Method checkSuperseded Undocumented

Inherited from TestCaseWithFactory (via TestPublisherBase, TestNativePublishingBase):

Method getUserBrowser Return a Browser logged in as a fresh user, maybe opened at url.
Method getNonRedirectingBrowser Undocumented
Method createBranchAtURL Create a branch at the supplied URL.
Method create_branch_and_tree Create a database branch, bzr branch and bzr checkout.
Method createBzrBranch Create a bzr branch for a database branch.
Static Method getBranchPath Return the path of the branch in the mirrored area.
Method useTempBzrHome Undocumented
Method useBzrBranches Prepare for using bzr branches.

Inherited from TestCase (via TestPublisherBase, TestNativePublishingBase, TestCaseWithFactory):

Method becomeDbUser Commit, then log into the database as dbuser.
Method __str__ The string representation of a test is its id.
Method useContext Use the supplied context in this test.
Method makeTemporaryDirectory Create a temporary directory, and return its path.
Method installKarmaRecorder Set up and return a KarmaRecorder.
Method assertProvides Assert 'obj' correctly provides 'interface'.
Method assertNotifies Assert that a callable performs a given notification.
Method assertNoNotification Assert that no notifications are generated by the callable.
Method assertSqlAttributeEqualsDate Fail unless the value of the attribute is equal to the date.
Method assertTextMatchesExpressionIgnoreWhitespace Undocumented
Method assertIsInstance Assert that an instance is an instance of assert_class.
Method assertIsNot Assert that expected is not the same object as observed.
Method assertContentEqual Assert that 'iter1' has the same content as 'iter2'.
Method assertRaisesWithContent Check if the given exception is raised with given content.
Method assertBetween Assert that 'variable' is strictly between two boundaries.
Method assertVectorEqual Apply assertEqual to all given pairs in one go.
Method expectedLog Expect a log to be written that matches the regex.
Method pushConfig Push some key-value pairs into a section of the config.
Method attachOopses Undocumented
Method attachLibrarianLog Include the logChunks from fixture in the test details.
Method assertStatementCount Assert that the expected number of SQL statements occurred.
Method useTempDir Use a temporary directory for this test.
Method assertEmailHeadersEqual Assert that two email headers are equal.
Method assertStartsWith Undocumented
Method assertEndsWith Asserts that s ends with suffix.
Method checkPermissions Check if the used_permissions match expected_permissions.
Method assertEmailQueueLength Pop the email queue, assert its length, and return it.
Method _unfoldEmailHeader Unfold a multiline email header.

Inherited from SoyuzTestPublisher (via TestPublisherBase, TestNativePublishingBase):

Method setUpDefaultDistroSeries Set up a distroseries that will be used by default.
Method prepareBreezyAutotest Prepare ubuntutest/breezy-autotest for publications.
Method addFakeChroots Add fake chroots for all the architectures in distroseries.
Method regetBreezyAutotest Undocumented
Method addMockFile Add a mock file in Librarian.
Method addPackageUpload Undocumented
Method uploadBinaryForBuild Return the corresponding BinaryPackageRelease.
Method publishBinaryInArchive Return the corresponding BinaryPackagePublishingHistory.
Method createSource Create source with meaningful '.changes' file.
Method makeSourcePackageSummaryData Make test data for SourcePackage.summary.
Method updatePackageCache Undocumented
Method _findChangesFile File with given name fragment in directory tree starting at top.
def assertDirtyPocketsContents(self, expected, dirty_pockets):
Undocumented
def assertReleaseContentsMatch(self, release, filename, contents):
Undocumented
def parseRelease(self, release_path):
Undocumented
def parseI18nIndex(self, i18n_index_path):
Undocumented
def testInstantiate(self):
Publisher should be instantiatable
def testPublishing(self):
Test the non-careful publishing procedure.

With one PENDING record, respective pocket dirtied.

def testDeletingPPA(self):
Test deleting a PPA
def testDeletingPPAWithoutMetaData(self):
Undocumented
def testDeletingPPAThatCannotHaveMetaData(self):
Undocumented
def testDeletingPPARename(self):
Undocumented
def testPublishPartner(self):
Test that a partner package is published to the right place.
def testPartnerReleasePocketPublishing(self):
Test partner package RELEASE pocket publishing.

Publishing partner packages to the RELEASE pocket in a stable distroseries is always allowed, so check for that here.

def testPublishingSpecificDistroSeries(self):
Test the publishing procedure with the suite argument.

To publish a specific distroseries.

def testPublishingSpecificPocket(self):
Test the publishing procedure with the suite argument.

To publish a specific pocket.

def testNonCarefulPublishing(self):
Test the non-careful publishing procedure.

With one PUBLISHED record, no pockets dirtied.

def testCarefulPublishing(self):
Test the careful publishing procedure.

With one PUBLISHED record, pocket gets dirtied.

def testPublishingOnlyConsidersOneArchive(self):
Publisher procedure should only consider the target archive.

Ignore pending publishing records targeted to another archive. Nothing gets published, no pockets get dirty

def testPublishingWorksForOtherArchives(self):
Publisher also works as expected for another archives.
def testPublishingSkipsObsoleteFuturePrimarySeries(self):
Publisher skips OBSOLETE/FUTURE series in PRIMARY archives.
def testPublishingConsidersObsoleteFuturePPASeries(self):
Publisher does not skip OBSOLETE/FUTURE series in PPA archives.
def testPublisherBuilderFunctions(self):
Publisher can be initialized via provided helper function.

In order to simplify the top-level publication scripts, one for 'main_archive' publication and other for 'PPA', we have a specific helper function: 'getPublisher'

def testPendingArchive(self):
Check Pending Archive Lookup.

IArchiveSet.getPendingPPAs should only return the archives with publications in PENDING state.

def testDeletingArchive(self):
Undocumented
def testPendingArchiveWithReapableFiles(self):
Undocumented
def testDirtySuitesArchive(self):
Undocumented
def _checkCompressedFiles(self, archive_publisher, base_file_path, suffixes):
Assert that the various compressed versions of a file are equal.

Check that the various versions of a compressed file, such as Packages.{gz,bz2,xz} and Sources.{gz,bz2,xz} all have identical contents. The file paths are relative to breezy-autotest/main under the archive_publisher's configured dist root. 'breezy-autotest' is our test distroseries name.

The contents of the uncompressed file is returned as a list of lines in the file.

def setupPPAArchiveIndexTest(self, long_descriptions=True, feature_flag=False, index_compressors=None):
Undocumented
def testPPAArchiveIndex(self):
Building Archive Indexes from PPA publications.
def testPPAArchiveIndexLongDescriptionsFalseFeatureFlagDisabled(self):
Undocumented
def testPPAArchiveIndexLongDescriptionsFalse(self):
Undocumented
def testPPAArchiveIndexCompressors(self):
Undocumented
def checkDirtyPockets(self, publisher, expected):
Check dirty_pockets contents of a given publisher.
def testDirtyingPocketsWithDeletedPackages(self):
Test that dirtying pockets with deleted packages works.

The publisher run should make dirty pockets where there are outstanding deletions, so that the domination process will work on the deleted publications.

def testDeletionDetectionRespectsAllowedSuites(self):
Check if the deletion detection mechanism respects allowed_suites.

The deletion detection should not request publications of pockets that were not specified on the command-line ('allowed_suites').

This issue is reported as bug #241452, when running the publisher only for a specific suite, in most of cases an urgent security release, only pockets with pending deletion that match the specified suites should be marked as dirty.

def testReleaseFile(self):
Test release file writing.

The release file should contain the MD5, SHA1 and SHA256 for each index created for a given distroseries.

def testReleaseFileForPPA(self):
Test release file writing for PPA

The release file should contain the MD5, SHA1 and SHA256 for each index created for a given distroseries.

Note that the individuals indexes have exactly the same content as the ones generated by apt-ftparchive (see previous test), however the position in the list is different (earlier) because we do not generate/list debian-installer (d-i) indexes in NoMoreAptFtpArchive approach.

Another difference between the primary repositories and PPAs is that PPA Release files for the distroseries and its architectures have a distinct 'Origin:' value. The origin is specific to each PPA, using the pattern 'LP-PPA-%(owner_name)s'. This allows proper pinning of the PPA packages.

def testReleaseFileForNamedPPA(self):
Undocumented
def testReleaseFileForPartner(self):
Test Release file writing for Partner archives.

Signed Release files must reference an uncompressed Sources and Packages file.

def testReleaseFileForNotAutomaticBackports(self):
Undocumented
def testReleaseFileForI18n(self):
Test Release file writing for translated package descriptions.
def testReleaseFileForContents(self):
Test Release file writing for Contents files.
def testReleaseFileForDEP11(self):
Undocumented
def testReleaseFileForCommandNotFound(self):
Undocumented
def testReleaseFileTimestamps(self):
Undocumented
def testReleaseFileWritingCreatesDirectories(self):
Undocumented
def testCreateSeriesAliasesNoAlias(self):
createSeriesAliases has nothing to do by default.
def _assertPublishesSeriesAlias(self, publisher, expected):
Undocumented
def testCreateSeriesAliasesChangesAlias(self):
createSeriesAliases tracks the latest published series.
def testHtaccessForPrivatePPA(self):
Undocumented
def testWriteSuiteI18n(self):
Test i18n/Index writing.
def testWriteSuiteI18nMissingDirectory(self):
i18n/Index is not generated when the i18n directory is missing.
def testWriteSuiteI18nEmptyDirectory(self):
i18n/Index is not generated when the i18n directory is empty.
def testReadIndexFileHashesCompression(self):
Test compressed file handling in _readIndexFileHashes.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.