Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kolla Ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Very Demiurge Very Mindful
Kolla Ansible
Commits
c3a4f78d
Commit
c3a4f78d
authored
4 years ago
by
Zuul
Committed by
Gerrit Code Review
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Stop mocking ansible modules globally"
parents
e53b3e69
4fcbdd77
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
lower-constraints.txt
+1
-0
1 addition, 0 deletions
lower-constraints.txt
test-requirements.txt
+1
-0
1 addition, 0 deletions
test-requirements.txt
tests/test_kolla_docker.py
+0
-5
0 additions, 5 deletions
tests/test_kolla_docker.py
tests/test_merge_config.py
+0
-5
0 additions, 5 deletions
tests/test_merge_config.py
with
2 additions
and
10 deletions
lower-constraints.txt
+
1
−
0
View file @
c3a4f78d
alabaster==0.7.10
alabaster==0.7.10
ansible==2.8.0
appdirs==1.4.3
appdirs==1.4.3
asn1crypto==0.24.0
asn1crypto==0.24.0
Babel==2.5.3
Babel==2.5.3
...
...
This diff is collapsed.
Click to expand it.
test-requirements.txt
+
1
−
0
View file @
c3a4f78d
...
@@ -11,3 +11,4 @@ coverage!=4.4,>=4.0 # Apache-2.0
...
@@ -11,3 +11,4 @@ coverage!=4.4,>=4.0 # Apache-2.0
docker
>=2.4.2 # Apache-2.0
docker
>=2.4.2 # Apache-2.0
oslotest
>=3.2.0 # Apache-2.0
oslotest
>=3.2.0 # Apache-2.0
stestr
>=2.0.0 # Apache-2.0
stestr
>=2.0.0 # Apache-2.0
ansible
>=2.8.0 # GPLv3
This diff is collapsed.
Click to expand it.
tests/test_kolla_docker.py
+
0
−
5
View file @
c3a4f78d
...
@@ -26,11 +26,6 @@ from docker.types import Ulimit
...
@@ -26,11 +26,6 @@ from docker.types import Ulimit
from
oslotest
import
base
from
oslotest
import
base
this_dir
=
os
.
path
.
dirname
(
sys
.
modules
[
__name__
].
__file__
)
this_dir
=
os
.
path
.
dirname
(
sys
.
modules
[
__name__
].
__file__
)
# FIXME(yoctozepto): this modifies global interpreter state and affects tests
# from other files
sys
.
modules
[
'
ansible
'
]
=
mock
.
MagicMock
()
sys
.
modules
[
'
ansible.module_utils
'
]
=
mock
.
MagicMock
()
sys
.
modules
[
'
ansible.module_utils.basic
'
]
=
mock
.
MagicMock
()
kolla_docker_file
=
os
.
path
.
join
(
this_dir
,
'
..
'
,
'
ansible
'
,
kolla_docker_file
=
os
.
path
.
join
(
this_dir
,
'
..
'
,
'
ansible
'
,
'
library
'
,
'
kolla_docker.py
'
)
'
library
'
,
'
kolla_docker.py
'
)
kd
=
imp
.
load_source
(
'
kolla_docker
'
,
kolla_docker_file
)
kd
=
imp
.
load_source
(
'
kolla_docker
'
,
kolla_docker_file
)
...
...
This diff is collapsed.
Click to expand it.
tests/test_merge_config.py
+
0
−
5
View file @
c3a4f78d
...
@@ -15,8 +15,6 @@
...
@@ -15,8 +15,6 @@
import
imp
import
imp
import
os
import
os
import
sys
from
unittest
import
mock
from
io
import
StringIO
from
io
import
StringIO
from
oslotest
import
base
from
oslotest
import
base
...
@@ -26,9 +24,6 @@ PROJECT_DIR = os.path.abspath(os.path.join(os. path.dirname(__file__), '../'))
...
@@ -26,9 +24,6 @@ PROJECT_DIR = os.path.abspath(os.path.join(os. path.dirname(__file__), '../'))
MERGE_CONFIG_FILE
=
os
.
path
.
join
(
PROJECT_DIR
,
MERGE_CONFIG_FILE
=
os
.
path
.
join
(
PROJECT_DIR
,
'
ansible/action_plugins/merge_configs.py
'
)
'
ansible/action_plugins/merge_configs.py
'
)
# FIXME(yoctozepto): this modifies global interpreter state and affects tests
# from other files
sys
.
modules
[
'
ansible.plugins
'
]
=
mock
.
MagicMock
()
merge_configs
=
imp
.
load_source
(
'
merge_configs
'
,
MERGE_CONFIG_FILE
)
merge_configs
=
imp
.
load_source
(
'
merge_configs
'
,
MERGE_CONFIG_FILE
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment