blob: b6ae394be693141534633547ef59c1fc2aed9b0e [file] [log] [blame]
---
# Copyright 2017-present Open Networking Foundation
#
# 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: Replace SERVER_IP in API Properties
replace:
dest: "{{ cord_test_dir }}/Properties/RestApiProperties.py"
regexp: "SERVER_IP = '.+'$"
replace: "SERVER_IP = '{{ api_test_server_ip }}'"
backup: yes
- name: Replace SERVER_PORT in API Properties
replace:
dest: "{{ cord_test_dir }}/Properties/RestApiProperties.py"
regexp: "SERVER_PORT = '.+'$"
replace: "SERVER_PORT = '{{ api_test_server_port }}'"
- name: Replace USER in API Properties
replace:
dest: "{{ cord_test_dir }}/Properties/RestApiProperties.py"
regexp: "USER = '.+'$"
replace: "USER = '{{ xos_admin_user }}'"
- name: Replace PASSWD in API Properties
lineinfile:
dest: "{{ cord_test_dir }}/Properties/RestApiProperties.py"
regexp: "^PASSWD"
line: "PASSWD = '{{ xos_admin_pass }}'"
- name: Get List of Tests to run
find:
paths: "{{ cord_test_dir }}/Tests"
patterns: '*.robot'
register: api_tests
- name: Run Core API Tests
command: >
pybot
-v xos_service:{{ item | regex_replace('.*/(\w+)_service_api.robot$', '\1' ) }}
-e ControllerImages
-e ContollerUser
-e ContollerSlice
-e Port
-e TenantWithContainer
-e AddressManagerServiceInstance {{ item }}
args:
chdir: "../../test/cord-tester/src/test/cord-api/Tests"
with_items: "{{ api_tests.files | map(attribute='path') | list }}"
register: cmdout
tags:
- skip_ansible_lint # pybot execution