ansible-collections-openstack/tools/run-ansible-sanity.sh
Sagi Shnaidman 7e4fbcf568 Fix ansible-tests for devel branch
Ignore for now deprecation warnings
(see https://github.com/ansible-collections/overview/issues/45#issuecomment-628262697)
Current there are bugs in ansible-test that prevent to run these
tests.

Change-Id: I9829bb23a45699e61d7b0af5ecc3e1a94bbbca85
2020-06-03 00:05:07 +03:00

31 lines
1.2 KiB
Bash

#!/bin/bash
# Copyright 2020 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.
TOXDIR=${1:-.}
ANSIBLE_COLLECTIONS_PATH=$(mktemp -d)
echo "Executing ansible-test sanity checks in ${ANSIBLE_COLLECTIONS_PATH}"
trap "rm -rf ${ANSIBLE_COLLECTIONS_PATH}" err exit
rm -rf "${ANSIBLE_COLLECTIONS_PATH}"
mkdir -p ${ANSIBLE_COLLECTIONS_PATH}/ansible_collections/openstack/cloud
cp -a ${TOXDIR}/{plugins,meta,scripts,tests,docs} ${ANSIBLE_COLLECTIONS_PATH}/ansible_collections/openstack/cloud
cd ${ANSIBLE_COLLECTIONS_PATH}/ansible_collections/openstack/cloud/
ansible-test sanity -v \
--venv \
--skip-test metaclass-boilerplate \
--skip-test future-import-boilerplate \
plugins/ docs/ meta/ scripts/ tests/