l.a.t.t.TestPPAUploadProcessor(TestPPAUploadProcessorBase) : class documentation

Part of lp.archiveuploader.tests.test_ppauploadprocessor View In Hierarchy

Functional tests for uploadprocessor.py in PPA operation.
Method testUploadToPPA Upload to a PPA gets there.
Method testNamedPPAUploadDefault Test PPA uploads to the default PPA.
Method testNamedPPAUploadNonDefault Test PPA uploads to a named PPA.
Method testNamedPPAUploadWithSeries Test PPA uploads to a named PPA location and with a distroseries.
Method testPPAPublisherOverrides Check that PPA components override to main at publishing time,
Method testPPABinaryUploads Check the usual binary upload life-cycle for PPAs.
Method testNamedPPABinaryUploads Check the usual binary upload life-cycle for named PPAs.
Method testPPACopiedSources Check PPA binary uploads for copied sources.
Method testUploadDoesNotEmailMaintainerOrChangedBy PPA uploads must not email the maintainer or changed-by person.
Method testUploadSendsEmailToPeopleInArchivePermissions PPA uploads result in notifications to ArchivePermission uploaders.
Method testPPADistroSeriesOverrides It's possible to override target distroseries of PPA uploads.
Method testUploadToTeamPPA Upload to a team PPA also gets there.
Method testNotMemberUploadToTeamPPA Upload to a team PPA is rejected when the uploader is not member.
Method testUploadToSomeoneElsePPA Upload to a someone else's PPA gets rejected.
Method testPPAPartnerUpload Upload a partner package to a PPA and ensure it's not rejected.
Method testMixedUpload Mixed PPA uploads are rejected with a appropriate message.
Method testPGPSignatureNotPreserved PGP signatures should be removed from PPA .changes files.
Method doCustomUploadToPPA Helper method to do a custom upload to a PPA.
Method testCustomUploadToPPA Test a custom upload to a PPA.
Method testCustomUploadToPrivatePPA Test a custom upload to a private PPA.
Method testUploadToPrivatePPA Test a source and binary upload to a private PPA.
Method testPPAInvalidComponentUpload Upload source and binary packages with invalid components.
Method testPPAUploadResultingInNoBuilds Source uploads resulting in no builds are rejected.
Method testUploadPathErrorIntendedForHumans Undocumented

Inherited from TestPPAUploadProcessorBase:

Method setUp Setup infrastructure for PPA tests.
Method makeArchive Undocumented
Method assertEmails Check recent email upload notification attributes.
Method checkFilesRestrictedInLibrarian Check the libraryfilealias restricted flag.

Inherited from TestUploadProcessorBase (via TestPPAUploadProcessorBase):

Method switchToUploader Undocumented
Method switchToAdmin Undocumented
Method tearDown Undocumented
Method getUploadProcessor Undocumented
Method publishPackage Publish a single package that is currently NEW in the queue.
Method assertLogContains Assert if a given line is present in the log messages.
Method assertRaisesAndReturnError See TestCase.assertRaises.
Method setupBreezy Create a fresh distroseries in ubuntu.
Method addMockFile Return a librarian file.
Method queueUpload Queue one of our test uploads.
Method processUpload Process an upload queue entry directory.
Method setupBreezyAndGetUploadProcessor Setup Breezy and return an upload processor for it.
Method PGPSignatureNotPreserved PGP signatures should be removed from .changes files.

Inherited from TestCaseWithFactory (via TestPPAUploadProcessorBase, TestUploadProcessorBase):

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 TestPPAUploadProcessorBase, TestUploadProcessorBase, 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.
def testUploadToPPA(self):
Upload to a PPA gets there.

Email announcement is sent and package is on queue DONE even if the source is NEW (PPA Auto-Approves everything), so PPA uploads will immediately result in a PENDING source publishing record ( thus visible in the UI) and a NEEDSBUILD build record ready to be dispatched.

Also test IDistribution.getPendingPublicationPPAs() and check if it returns the just-modified archive.

def testNamedPPAUploadDefault(self):
Test PPA uploads to the default PPA.
def testNamedPPAUploadNonDefault(self):
Test PPA uploads to a named PPA.
def testNamedPPAUploadWithSeries(self):
Test PPA uploads to a named PPA location and with a distroseries.

As per testNamedPPAUpload above, but we override the distroseries.

def testPPAPublisherOverrides(self):
Check that PPA components override to main at publishing time,

To preserve the original upload data, PPA uploads are not overridden until they are published. This means that the SourcePackageRelease and BinaryPackageRelease keep the uploaded data, but the publishing tables have the overridden data.

def testPPABinaryUploads(self):
Check the usual binary upload life-cycle for PPAs.
def testNamedPPABinaryUploads(self):
Check the usual binary upload life-cycle for named PPAs.
def testPPACopiedSources(self):
Check PPA binary uploads for copied sources.
def testUploadDoesNotEmailMaintainerOrChangedBy(self):
PPA uploads must not email the maintainer or changed-by person.

The package metadata must not influence the email addresses, it's the uploader only who gets emailed.

def testUploadSendsEmailToPeopleInArchivePermissions(self):
PPA uploads result in notifications to ArchivePermission uploaders.

Anyone listed as an uploader in ArchivePermissions will automatically get an upload notification email.

See https://bugs.launchpad.net/soyuz/+bug/397077

def testPPADistroSeriesOverrides(self):

It's possible to override target distroseries of PPA uploads.

Similar to usual PPA uploads:

  • Email notification is sent
  • The upload is auto-accepted in the overridden target distroseries.
  • The modified PPA is found by getPendingPublicationPPA() lookup.
def testUploadToTeamPPA(self):
Upload to a team PPA also gets there.

See testUploadToPPA.

def testNotMemberUploadToTeamPPA(self):
Upload to a team PPA is rejected when the uploader is not member.

Also test IArchiveSet.getPendingPublicationPPAs(), no archives should be returned since nothing was accepted.

def testUploadToSomeoneElsePPA(self):
Upload to a someone else's PPA gets rejected.
def testPPAPartnerUpload(self):
Upload a partner package to a PPA and ensure it's not rejected.
def testMixedUpload(self):
Mixed PPA uploads are rejected with a appropriate message.
def testPGPSignatureNotPreserved(self):
PGP signatures should be removed from PPA .changes files.

Email notifications and the librarian file for .changes file should both have the PGP signature removed.

def doCustomUploadToPPA(self):
Helper method to do a custom upload to a PPA.
ReturnsThe queue items that were uploaded.
def testCustomUploadToPPA(self):
Test a custom upload to a PPA.

For now, we just test that the right librarian is used as all
of the existing custom upload tests use doc/distroseriesqueue-*.
def testCustomUploadToPrivatePPA(self):
Test a custom upload to a private PPA.

Make sure that the files are placed in the restricted librarian.

def testUploadToPrivatePPA(self):
Test a source and binary upload to a private PPA.

Make sure that the files are placed in the restricted librarian.

def testPPAInvalidComponentUpload(self):
Upload source and binary packages with invalid components.

Components invalid in the distroseries should be ignored since PPAs are always published in "main".

def testPPAUploadResultingInNoBuilds(self):
Source uploads resulting in no builds are rejected.

If a PPA source upload results in no builds, it will be rejected.

It usually happens for sources targeted to architectures not supported in the PPA subsystem.

This way we don't create false expectations accepting sources that won't be ever built.

def testUploadPathErrorIntendedForHumans(self):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2018-10-15 00:00:04.