add_subdirectory(dashboard)
endif()
add_subdirectory(insights)
-add_subdirectory(ansible)
if(WITH_TESTS)
include(AddCephTest)
+++ /dev/null
-if(WITH_TESTS)
- include(AddCephTest)
- add_tox_test(mgr-ansible)
-endif()
+++ /dev/null
-tox==2.9.1
-pytest
-mock
-requests-mock
--e ../../../python-common
import logging
import unittest
-import mock
+from tests import mock
import json
+import os
import requests_mock
PB_UUID = "1733c3ac"
# Playbook execution data file
-PB_EVENTS_FILE = "./tests/pb_execution_events.data"
+PB_EVENTS_FILE = os.path.dirname( __file__) + "/pb_execution_events.data"
# create console handler and set level to info
logger = logging.getLogger()
""" Test output wizards
"""
import unittest
-import mock
+from tests import mock
from ..ansible_runner_svc import EVENT_DATA_URL
from ..output_wizards import ProcessHostsList, ProcessPlaybookResult, \
+++ /dev/null
-[tox]
-envlist = py{27,3}
-skipsdist = true
-toxworkdir = {env:CEPH_BUILD_DIR}/ansible
-minversion = 2.8.1
-
-[testenv]
-deps =
- -rrequirements.txt
-setenv=
- UNITTEST = true
- py27: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.2
- py3: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.3
-commands=
- {envbindir}/py.test tests/
ipaddress; python_version < '3.3'
../../python-common
kubernetes
+requests-mock
\ No newline at end of file
[testenv]
setenv = UNITTEST = true
deps = -r requirements.txt
-commands = pytest -v --cov --cov-append --cov-report=term --doctest-modules {posargs:mgr_util.py tests/ cephadm/}
+commands = pytest -v --cov --cov-append --cov-report=term --doctest-modules {posargs:mgr_util.py tests/ cephadm/ ansible/}
[testenv:mypy]
basepython = python3
deps =
-r requirements.txt
mypy
-commands = mypy --config-file=../../mypy.ini orchestrator.py cephadm/module.py rook/module.py
\ No newline at end of file
+commands = mypy --config-file=../../mypy.ini orchestrator.py cephadm/module.py rook/module.py ansible/module.py
\ No newline at end of file