This adds a jinja2 lint environment in tox for testing the cephadm jinja2
templates.
This patch fixes some minor jinja2 syntax for ganesha and keepalived even if
the current templates work perfectly.
Tags should have one (and only one) space
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
endif()
if(WITH_TESTS)
include(AddCephTest)
- add_tox_test(mgr ${CMAKE_CURRENT_SOURCE_DIR} TOX_ENVS py3 mypy flake8)
+ add_tox_test(mgr ${CMAKE_CURRENT_SOURCE_DIR} TOX_ENVS py3 mypy flake8 jinjalint)
endif()
# Location needs to match default setting for mgr_module_path, currently:
}
unicast_src_ip {{ host_ip }}
unicast_peer {
- {% for ip in other_ips %}
+ {% for ip in other_ips %}
{{ ip }}
{% endfor %}
}
RADOS_KV {
UserId = "{{ user }}";
- nodeid = "{{ nodeid}}";
+ nodeid = "{{ nodeid }}";
pool = "{{ pool }}";
namespace = "{{ namespace }}";
}
test,
fix
flake8
+ jinjalint
skipsdist = true
requires = cython
commands =
flake8 --config=tox.ini {posargs} \
{posargs:{[testenv:flake8]modules}}
+
+[testenv:jinjalint]
+basepython = python3
+deps =
+ jinjaninja
+commands =
+ jinja-ninja cephadm/templates