[ci] Get back testing samples

Change-Id: I7b4777fa502f2b9da5770d67947357a02b5f1ad0
This commit is contained in:
Andrey Kurilin 2020-03-25 14:21:13 +02:00
parent 1332ad7d91
commit fcb1fb6c60
4 changed files with 19 additions and 5 deletions

View File

@ -87,6 +87,16 @@
vars:
tox_env: py38
- job:
name: rally-tox-samples
parent: rally-tox-base
description: |
Run unit test for rally project.
Uses tox with the ``samples`` environment.
vars:
tox_env: samples
- job:
name: rally-tox-cover
parent: tox-cover

View File

@ -88,6 +88,7 @@
- rally-tox-py36
- rally-tox-py37
- rally-tox-py38
- rally-tox-samples
- rally-tox-functional
- rally-tox-functional-py38
- rally-tox-self

View File

@ -17,8 +17,8 @@ import inspect
import itertools
import os
import traceback
from unittest import mock
import mock
import yaml
import rally
@ -37,10 +37,7 @@ class TaskSampleTestCase(test.TestCase):
def setUp(self):
super(TaskSampleTestCase, self).setUp()
if os.environ.get("TOX_ENV_NAME") == "cover":
self.skipTest("There is no need to check samples in coverage job.")
with mock.patch("rally.api.API.check_db_revision"):
self.rapi = api.API()
self.rapi = api.API(skip_db_check=True)
def iterate_samples(self, merge_pairs=True):
"""Iterates all task samples

View File

@ -40,6 +40,12 @@ basepython = python3.7
[testenv:py38]
basepython = python3.8
[testenv:samples]
commands =
find . -type f -name "*.pyc" -delete
python {toxinidir}/tests/ci/pytest_launcher.py tests/samples --posargs={posargs}
[testenv:venv]
commands = {posargs}