This adopts old functional tests to be executed and verified through molecule instead of the leveraging tests repo. We do not yet fully test connection plugin as more work needs to be put into it. Change-Id: I8a42464f34f2438642046f28a4e8451fd876dcf1
82 lines
2.7 KiB
YAML
82 lines
2.7 KiB
YAML
---
|
|
# Copyright 2016, @WalmartLabs
|
|
#
|
|
# 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.
|
|
|
|
|
|
- name: Test filters
|
|
hosts: localhost
|
|
connection: local
|
|
gather_facts: false
|
|
tasks:
|
|
- name: Validate string_2_int filter
|
|
ansible.builtin.assert:
|
|
that:
|
|
- "{{ 'test' | openstack.osa.string_2_int }} == 3752"
|
|
|
|
- name: Set pip package list facts
|
|
ansible.builtin.set_fact:
|
|
pip_package_list_1:
|
|
- pip==8.1.2
|
|
- setuptools==25.1.0
|
|
- wheel==0.29.0
|
|
pip_package_list_2:
|
|
- babel==2.3.4
|
|
- pip==8.1.0
|
|
pip_package_list_merged:
|
|
- babel==2.3.4
|
|
- pip==8.1.0
|
|
- setuptools==25.1.0
|
|
- wheel==0.29.0
|
|
|
|
- name: Set splitlines string facts
|
|
ansible.builtin.set_fact:
|
|
string_with_lines: |
|
|
this
|
|
is
|
|
a
|
|
test
|
|
string_split_lines:
|
|
- this
|
|
- is
|
|
- a
|
|
- test
|
|
- name: Set splitlines filter fact
|
|
ansible.builtin.set_fact:
|
|
string_split_lines_filtered: "{{ string_with_lines | openstack.osa.splitlines }}"
|
|
- name: Validate splitlines filter
|
|
ansible.builtin.assert:
|
|
that: "string_split_lines_filtered == string_split_lines"
|
|
|
|
- name: Set git repo facts
|
|
ansible.builtin.set_fact:
|
|
git_repo: "git+https://git.openstack.org/openstack/nova@2bc8128d7793cc72ca2e146de3a092e1fef5033b#egg=nova&gitname=nova"
|
|
git_repo_name: nova
|
|
git_repo_link_parts:
|
|
name: nova
|
|
version: 2bc8128d7793cc72ca2e146de3a092e1fef5033b
|
|
plugin_path: null
|
|
url: "https://git.openstack.org/openstack/nova"
|
|
original: "git+https://git.openstack.org/openstack/nova@2bc8128d7793cc72ca2e146de3a092e1fef5033b#egg=nova&gitname=nova"
|
|
|
|
- name: Set deprecation variable facts
|
|
ansible.builtin.set_fact:
|
|
new_var: new
|
|
old_var: old
|
|
- name: Set deprecated filter fact
|
|
ansible.builtin.set_fact:
|
|
deprecated_value: "{{ new_var | openstack.osa.deprecated(old_var, 'old_var', 'new_var', 'Next Release', false) }}"
|
|
- name: Validate deprecated filter
|
|
ansible.builtin.assert:
|
|
that: "deprecated_value == old_var"
|