Add releases script pytest tests to tox.ini
Add tox testing in upstream jobs with changes to the releases script. Removed pyflakes as these test are not running as required. Change-Id: I3fdf0be7beb814a681a2dcc155bae87fdb6a4c7e
This commit is contained in:
parent
935b7e76a9
commit
7ca3fcd685
|
@ -2,6 +2,7 @@ import logging
|
|||
import re
|
||||
import requests
|
||||
|
||||
# Define releases
|
||||
RELEASES = ['newton', 'ocata', 'pike', 'queens', 'master']
|
||||
LONG_TERM_SUPPORT_RELEASES = ['queens']
|
||||
|
||||
|
|
|
@ -30,5 +30,5 @@ def test_null_response_raises_runtimeerror(mock_get):
|
|||
mock_get.return_value = None
|
||||
with pytest.raises(RuntimeError):
|
||||
get_dlrn_hash(release, hash_name)
|
||||
mock_get.assert_called(repo_url, timeout=(3.05, 27))
|
||||
mock_get.assert_called_with(repo_url, timeout=(3.05, 27))
|
||||
assert (10 == mock_get.call_count)
|
||||
|
|
13
tox.ini
13
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = pyflakes, pep8, py27
|
||||
envlist = pep8, py27, py35
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
|
@ -32,3 +32,14 @@ commands = python scripts/tripleo-jobs-gerrit.py {posargs}
|
|||
# separately, outside of the requirements files.
|
||||
deps = bindep
|
||||
commands = bindep test
|
||||
|
||||
# This environment is used to run unit tests
|
||||
[testenv:py27]
|
||||
deps = {[testenv]deps}
|
||||
changedir = scripts/emit_releases_file
|
||||
commands = pytest
|
||||
|
||||
[testenv:py35]
|
||||
deps={[testenv]deps}
|
||||
changedir = {[testenv:py27]changedir}
|
||||
commands = {[testenv:py27]commands}
|
||||
|
|
|
@ -10,3 +10,20 @@
|
|||
- tripleo-multinode-container-minimal
|
||||
- tripleo-multinode-experimental
|
||||
- tripleo-undercloud-jobs
|
||||
check:
|
||||
jobs:
|
||||
- openstack-tox-py27:
|
||||
files:
|
||||
- ^scripts/emit_releases_file/.*$
|
||||
- openstack-tox-py35:
|
||||
files:
|
||||
- ^scripts/emit_releases_file/.*$
|
||||
gate:
|
||||
queue: tripleo
|
||||
jobs:
|
||||
- openstack-tox-py27:
|
||||
files:
|
||||
- ^scripts/emit_releases_file/.*$
|
||||
- openstack-tox-py35:
|
||||
files:
|
||||
- ^scripts/emit_releases_file/.*$
|
||||
|
|
Loading…
Reference in New Issue