Last commit made on 2023-03-23
Get this branch:
git clone -b set-command-basic-unittests https://git.launchpad.net/ppa-dev-tools
Only Bryce Harrington can upload to this branch. If you are Bryce Harrington please log in for upload directions.

Branch merges

Branch information


Recent commits

6220373... by Bryce Harrington

create/set: Add support for --publish setting

The --publish/--no-publish parameters controls whether or not the PPA is
configured to allow packages to be downloaded once they've been
successfully built. With --no-publish, packages will still be
built (although not for private PPAs, for some reason).

c543114... by Bryce Harrington

tests: Override the archive in PersonMock to use ArchiveMock

In Launchpad, a Person (or Team) is used to construct an Archive (or
PPA). Since the unittest won't be communicating with Launchpad itself,
we need to replicate all these objects via mocks.

If we construct the ArchiveMock() only when requested in getPPAByName(),
then any changes made to it by the set command won't be persisted
anywhere, thus making it impossible to validate the settings we've

So, instead, the PersonMock forcibly redefines the archive property for
the Ppa class to return the ArchiveMock, thereby moving it to a deeper
level down where changes to it will be captured and persisted.

7ebd8ec... by Bryce Harrington

tests: Add unit tests for setting name and description

8208d21... by Bryce Harrington

ppa: Accept descriptions from command line via --description

The PPA description is taken preferentially from the --description
argument, if given, and read from stdin otherwise.

bad3b8b... by Bryce Harrington

Add repository class

Provides a programmatic interface to the top directories a local mirror
of an apt repository. This allows inspection of the main sections of
the mirrors or "suites", which represent different Ubuntu distro release
pockets such as 'lunar-proposed', 'kinetic-security', or 'feisty-updates'.

This includes handling of one special case: The 'release' pocket is not
stored by name, but represents the default (blank) pocket. So, for
example, 'jammy' should really be interpreted as 'jammy-release'.

(This also includes an initial stub of a Suite class but just as a data
shim. It will be broken out and expanded in latter commits.)

7e59879... by Bryce Harrington

ppa: Raise exception on invalid ppa name

This might break a few uses that are only checking for a null config,
but raising an exception in this circumstance is a better behavior.

b5b41be... by Bryce Harrington

tests: Create mock PPAs with the default processors enabled

4485f2f... by Bryce Harrington

tests: Add tests for create_config()

Implements test cases for the create_config() routine, including
checking for expected exceptions.

4114463... by Bryce Harrington

ppa: Move DEFAULT_CONFIG to top level

This is to facilitate testing, so we can use this data object to
distinguish changed values.

f977aea... by Bryce Harrington

Add typing info for argparse objects