Skip to content

Commit 46eaefe

Browse files
committed
init
1 parent 1005a38 commit 46eaefe

File tree

9 files changed

+310
-132
lines changed

9 files changed

+310
-132
lines changed

.config/dictionary.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ virl
77
virsh
88
xmltodict
99
getppid
10-
fqcn
10+
fqcn

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ repos:
126126
args:
127127
- src/
128128
additional_dependencies:
129-
- ansible-core
129+
- ansible-pylibssh
130130
- pytest
131+
- xmltodict
131132
pass_filenames: false

.prettierignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Stuff we don't want priettier to ever to look into
2+
.git/
3+
.tox/
4+
.mypy_cache/
5+
build/
6+
7+
# Environments
8+
.env
9+
.venv
10+
env/
11+
venv/
12+
ENV/
13+
env.bak/
14+
venv.bak/

.yamllint

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
extends: default
3+
4+
rules:
5+
comments:
6+
min-spaces-from-content: 1

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,30 @@
1-
# pytest-integration
1+
# pytest-ansible-network-integration
2+
3+
An experimental pytest plugin designed to run ansible network integration tests against an a ppliance defined in an CML lab topology.
4+
5+
Required environment variables:
6+
7+
- ANSIBLE_NETWORK_OS
8+
- CML_SSH_PASSWORD
9+
- CML_SSH_PORT
10+
- CML_SSH_USER
11+
- VIRL_HOST
12+
- VIRL_PASSWORD
13+
- VIRL_USERNAME
14+
15+
Required pytest command line parameters:
16+
17+
- --integration-tests-path
18+
- ---cml-lab
19+
20+
Sample pyproject.toml:
21+
22+
```
23+
[tool.pytest.ini_options]
24+
addopts = "-s -vvv --integration-tests-path=tests/integration/targets --cml-lab=./tests/integration/labs/single.yaml"
25+
testpaths = ["tests"]
26+
filterwarnings = [
27+
'ignore:AnsibleCollectionFinder has already been configured',
28+
'ignore:_AnsibleCollectionFinder.find_spec().*',
29+
]
30+
```

mypy.ini

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[mypy]
2+
files =
3+
src/
4+
install_types = true
5+
namespace_packages = true
6+
no_implicit_optional = true
7+
non_interactive = true
8+
pretty = true
9+
show_column_numbers = true
10+
show_error_codes = true
11+
show_error_context = true
12+
strict = true
13+
strict_optional = true
14+
15+
[mypy-pylibsshext.*]
16+
# No type hints as of version 0.4.0
17+
ignore_missing_imports = true
18+
19+
20+
21+
[mypy-xmltodict]
22+
# No type hints as of version 0.12.0
23+
ignore_missing_imports = true

pyproject.toml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,39 @@ lines_between_types = 1 # Separate import/from with 1 line, minimizing changes a
99
no_lines_before = "LOCALFOLDER" # Keeps local imports bundled with first-party
1010
profile = "black" # Avoid conflict with black
1111
skip_glob = [
12-
"tests/fixtures/common/collections*"
12+
"tests/fixtures/common/collections*"
1313
] # Skip ansible content due to ansible-test sanity ruleset
1414

1515
[tool.pylint]
1616

1717
[tool.pylint.format]
1818
max-line-length = 100
19+
20+
[tool.pylint.imports]
21+
preferred-modules = [
22+
# NOTE: The unittest replacements below help keep
23+
# NOTE: the tests pytest ecosystem-oriented.
24+
"unittest:pytest",
25+
"unittest.mock:pytest-mock",
26+
]
27+
28+
[tool.pylint.master]
29+
ignore = [
30+
"_version.py", # built by setuptools_scm
31+
32+
]
33+
# pylint defaults + fh for with open .. as (f|fh)
34+
good-names = "i,j,k,ex,Run,_,f,fh"
35+
jobs = 0
36+
37+
[tool.pylint.messages_control]
38+
disable = [
39+
"duplicate-code",
40+
"fixme",
41+
"too-few-public-methods",
42+
"unsubscriptable-object",
43+
]
44+
enable = [
45+
"useless-suppression", # Identify unneeded pylint disable statements
46+
47+
]

0 commit comments

Comments
 (0)