Skip to content

Commit

Permalink
[ci] Get back testing samples
Browse files Browse the repository at this point in the history
Change-Id: I7b4777fa502f2b9da5770d67947357a02b5f1ad0
  • Loading branch information
andreykurilin committed Mar 25, 2020
1 parent 1332ad7 commit fcb1fb6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
10 changes: 10 additions & 0 deletions .zuul.d/python-jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .zuul.d/zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions tests/samples/test_task_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import itertools
import os
import traceback
from unittest import mock

import mock
import yaml

import rally
Expand All @@ -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
Expand Down
6 changes: 6 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down

0 comments on commit fcb1fb6

Please sign in to comment.