~racb/git-ubuntu:test-fixes

Last commit made on 2018-02-23
Get this branch:
git clone -b test-fixes https://git.launchpad.net/~racb/git-ubuntu
Only Robie Basak can upload to this branch. If you are Robie Basak please log in for upload directions.

Branch merges

Branch information

Name:
test-fixes
Repository:
lp:~racb/git-ubuntu

Recent commits

9d4b359... by Nish Aravamudan

tests: changelog test files should move to pkg_resources

In order to access the changelog files regardless of running from the
Git repository or the snap, we need to have the test files in the
package and available via pkg_resources.

This should be done for all future testing infrastructure as we add it,
as well.

089c1e0... by Robie Basak

Factor out duplicate code

Now that we have the get_spec_changelog_version test helper, use it to
eliminate duplicate code.

67aa323... by Robie Basak

source_builder: add additional tests

These are test cases that handle the failure cases fixed in the previous
commit.

586c939... by Robie Basak

source_builder: handle native and version defaults

There were a few interconnected bugs here. Non-native versions must have
a '-' in them. When specified by the caller explicitly, make sure this
is the case and raise an exception if it is not. When a version string
is created by default, make sure it matches the nativeness of the
package. The orig tarball, in the case of a non-native package, must
have the Debian revision stripped from its name.

Original fix by Nish; I have modified it substantially here.

262601c... by Nish Aravamudan

source_builder_test: version and changelog_versions are specified as strings

87b09e0... by Nish Aravamudan

source_builder: do not build a changes file

Technically this is not necessary (the DSC is sufficient) and
dpkg-buildpackage fails in the snap, due to not shipping a gcc.

Thanks to Robie Basak.

807840c... by Robie Basak

SourceSpec/SourceFiles: add changelog_versions

This allows a Source to be created with a predefined list of versions in
debian/changelog. This is useful, for example, for control of changelog
parents during testing.

f55596f... by Robie Basak

Merge branch 'source-tree' into HEAD

bb9fecb... by Robie Basak

Merge branch 'decouple-gitubunturepository' into HEAD

b7d356f... by Robie Basak

Prevent modification of GitUbuntuRepository env

Since it is common to take a GitUbuntuRepository instance env property
and then adjust it, make sure that modifying the dictionary returned
from the property getter does not modify the dictionary owned by the
instance itself. This adds some robustness against this common use
pattern.