diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..90d4055 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +ansible diff --git a/tests/test.yaml b/tests/test.yaml new file mode 100644 index 0000000..afbb683 --- /dev/null +++ b/tests/test.yaml @@ -0,0 +1,2 @@ +--- +- import_playbook: test_parser_templates.yaml diff --git a/tools/test-setup.sh b/tools/test-setup.sh new file mode 100755 index 0000000..8c96ca2 --- /dev/null +++ b/tools/test-setup.sh @@ -0,0 +1,20 @@ +#!/bin/bash -ex +# Copyright 2017 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE(pabelanger): Create a symlink for ansible-network.network-engine to keep +# meta/main.yml happy +ln -s ~/src/github.com/ansible-network/network-engine \ + ~/src/github.com/ansible-network/ansible-network.network-engine diff --git a/tox.ini b/tox.ini index c11bf88..6870785 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,13 @@ envlist = linters [testenv] install_command = pip install {opts} {packages} -deps = -r{toxinidir}/test-requirements.txt +commands = + ansible-playbook -v -i tests/inventory tests/test.yaml +deps = + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt +setenv = + ANSIBLE_CALLBACK_PLUGINS = {envsitepackagesdir}/ara/plugins/callbacks [testenv:linters] basepython = python3