Commit Graph

5 Commits

Author SHA1 Message Date
HeroicHitesh 687a3127d3 Migrate from testr to stestr
* Replace .testr.conf by .stestr.conf for migration and update
  .gitignore, test-requirements.txt and lower-constraints.txt
  files accordingly
* Use py3 as the default runtime and 3.18.0 as the minversion
  for tox
* Add group_regex to run all tests

Signed-off-by: HeroicHitesh <email.hiteshkumar@gmail.com>
Change-Id: I704356082e2c25d21aff3c5433efa077259b0b1d
2021-06-30 18:58:35 +05:30
Ian Wienand c52c383f1b package-installs: provide for skip from env var
Provide a "when" option that provides for not installing packages
based on a = or != match on an environment variable.

Unit tests are added.

Change-Id: Ifa824dccaff69fd447f45d54cb4a3083bcabdd86
2018-11-30 10:02:47 +11:00
Ian Wienand baf3ced0c3 Fix coverage report
There's a few things going on here

Firstly, we need to install coverage tool in test-requirements

Secondly, .testr.conf has to use PYTHON because the coverage report
works by resetting PYTHON='coverage run ...'

Thirdly, because we call ourselves diskimage-builder but the python
module is diskimage_builder that seems to confuse things.  We need to
use "setup.py test" (note, that is different to "setup.py testr"!) to
use the PBR testr wrapper.  That exposes a --coverage-package-name
argument that calls the coverage tool with the right argument.

With this I got a coverage report for our unit tests

Change-Id: I9012e18eb7d01bee035140e70afa76c47c27eb01
2017-01-18 16:14:01 +11:00
Ben Nemec 58d6c6478a Add unit test for cache-url
A sanity check that cache-url does the right thing when presented
with the appropriate curl return codes.  This change brings in the
test code for scripts from tripleo-image-elements, which needs to
be factored out into a place both projects can use it.

I'm stubbing out curl so we don't have a dep on curl in our unit
tests, and because I've seen some strange behavior out of curl in
the gate that caused random failures in this test.

Change-Id: I31e6b06b45415feec7285511d07e65eb78d0d045
2014-09-30 16:39:21 -05:00
Robert Collins daf9fc1d6b Add a .testr.conf configuration and ignore .testrepository.
Change-Id: I182d8b5567732ecf3da69f580c3e4b6d6438ab6b
2012-12-14 20:17:39 +13:00