Move test_os_server and apply fixes.
- Add missing meta value for test_create_server - Add .gitignore for pytest .cache directory Exclude test_os_server from nose test runs since it was designed for pytest. The test will work correctly when run using pytest. This is a temporary issue, as we'll be moving to pytest soon.
This commit is contained in:
parent
a0f1dcbd0f
commit
e24588902f
4 changed files with 6 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -54,6 +54,7 @@ credentials.yml
|
||||||
*.out
|
*.out
|
||||||
.coverage
|
.coverage
|
||||||
.tox
|
.tox
|
||||||
|
.cache
|
||||||
results.xml
|
results.xml
|
||||||
coverage.xml
|
coverage.xml
|
||||||
/test/units/cover-html
|
/test/units/cover-html
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -106,10 +106,10 @@ NOSETESTS3 ?= nosetests-3.5
|
||||||
all: clean python
|
all: clean python
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
PYTHONPATH=./lib $(NOSETESTS) -d -w test/units -v --with-coverage --cover-package=ansible --cover-branches --cover-erase
|
PYTHONPATH=./lib $(NOSETESTS) -d -w test/units -v --with-coverage --cover-package=ansible --cover-branches --cover-erase -e test_os_server
|
||||||
|
|
||||||
tests-py3:
|
tests-py3:
|
||||||
PYTHONPATH=./lib $(NOSETESTS3) -d -w test/units -v --with-coverage --cover-package=ansible --cover-branches --cover-erase
|
PYTHONPATH=./lib $(NOSETESTS3) -d -w test/units -v --with-coverage --cover-package=ansible --cover-branches --cover-erase -e test_os_server
|
||||||
|
|
||||||
integration:
|
integration:
|
||||||
test/utils/shippable/integration.sh
|
test/utils/shippable/integration.sh
|
||||||
|
|
0
test/units/modules/core/cloud/openstack/__init__.py
Normal file
0
test/units/modules/core/cloud/openstack/__init__.py
Normal file
|
@ -4,7 +4,7 @@ import yaml
|
||||||
import inspect
|
import inspect
|
||||||
import collections
|
import collections
|
||||||
|
|
||||||
from cloud.openstack import os_server
|
from ansible.modules.core.cloud.openstack import os_server
|
||||||
|
|
||||||
|
|
||||||
class AnsibleFail(Exception):
|
class AnsibleFail(Exception):
|
||||||
|
@ -180,6 +180,8 @@ class TestCreateServer(object):
|
||||||
flavor: m1.tiny
|
flavor: m1.tiny
|
||||||
nics:
|
nics:
|
||||||
- net-name: network1
|
- net-name: network1
|
||||||
|
meta:
|
||||||
|
- key: value
|
||||||
'''
|
'''
|
||||||
with pytest.raises(AnsibleExit):
|
with pytest.raises(AnsibleExit):
|
||||||
os_server._create_server(self.module, self.cloud)
|
os_server._create_server(self.module, self.cloud)
|
Loading…
Reference in a new issue