mirror of https://github.com/ceph/ceph-ansible.git
move library/plugins tests files under tests dir
To avoid unnecessary ansible warnings during playbook execution we can
move the library and plugins test files under a different directory.
[WARNING]: Skipping plugin (plugins/filter/test_ipaddrs_in_ranges.py) as
it seems to be invalid:
cannot import name 'ipaddrs_in_ranges'
Closes: #4656
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 6ce4fde820
)
pull/4694/head
parent
b547ad9e71
commit
359abedbb1
|
@ -9,5 +9,5 @@ install:
|
||||||
- pip install ansible-lint pytest
|
- pip install ansible-lint pytest
|
||||||
script:
|
script:
|
||||||
- if [[ -n $(grep --exclude-dir=.git -P "\xa0" -r .) ]]; then echo 'NBSP characters found'; exit 1; fi
|
- if [[ -n $(grep --exclude-dir=.git -P "\xa0" -r .) ]]; then echo 'NBSP characters found'; exit 1; fi
|
||||||
- pytest -vvvv library/ plugins/
|
- pytest -vvvv tests/library/ tests/plugins/filter/
|
||||||
- for i in $(ls -1 roles/); do ANSIBLE_LOG_PATH=/dev/null ansible-lint -x 204 -v roles/$i/; if [ $? -ne 0 ]; then exit 1; fi; done
|
- for i in $(ls -1 roles/); do ANSIBLE_LOG_PATH=/dev/null ansible-lint -x 204 -v roles/$i/; if [ $? -ne 0 ]; then exit 1; fi; done
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
from . import ceph_crush
|
import sys
|
||||||
|
sys.path.append('./library')
|
||||||
|
import ceph_crush
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
from . import ceph_key
|
import sys
|
||||||
|
sys.path.append('./library')
|
||||||
|
import ceph_key
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
from . import ceph_volume
|
import sys
|
||||||
|
sys.path.append('./library')
|
||||||
|
import ceph_volume
|
||||||
import mock
|
import mock
|
||||||
import os
|
import os
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
from . import ipaddrs_in_ranges
|
import sys
|
||||||
|
sys.path.append('./plugins/filter')
|
||||||
|
import ipaddrs_in_ranges
|
||||||
|
|
||||||
filter_plugin = ipaddrs_in_ranges.FilterModule()
|
filter_plugin = ipaddrs_in_ranges.FilterModule()
|
||||||
|
|
Loading…
Reference in New Issue