Create sasl user in func test

Change-Id: I8f0941bd847f26e0ba5ec925606ee30396be9230
This commit is contained in:
Andy Smith 2018-07-11 15:23:42 -04:00
parent 5e3a7130de
commit 20022aac1d
8 changed files with 28 additions and 10 deletions

View File

@ -2,4 +2,3 @@
host=review.openstack.org
port=29418
project=openstack/ansible-role-qdrouterd.git
defaultbranch=master

View File

@ -26,13 +26,11 @@
tags:
- qdrouterd-config
- name: Create the log directory
- name: Create the lib directory
file:
path: "/var/lib/qdrouterd/"
state: "directory"
group: "qdrouterd"
owner: "qdrouterd"
recurse: true
mode: "0755"
tags:
- qdrouterd-config

View File

@ -19,6 +19,6 @@
scm: git
version: master
- name: previous_qdrouterd_server
src: https://github.com/ajssmith/ansible-qdrouterd
src: https://git.openstack.org/openstack/ansible-role-qdrouterd
scm: git
version: master

View File

@ -14,7 +14,7 @@
# limitations under the License.
- name: Gather facts
hosts: "all"
hosts: "qdrouterd_all"
user: root
gather_facts: true
@ -28,4 +28,4 @@
roles:
- role: "previous_qdrouterd_server"
vars_files:
- common/previous/test-vars.yml
- test-vars.yml

View File

@ -74,6 +74,11 @@
debug:
var: qdrouterd_statistics
- name: Check for peer router connections
assert:
that:
- "'Connections 3' in qdrouterd_statistics.stdout"
- name: Get qdrouterd node view
command: "qdstat -nv -b 0.0.0.0:31459"
register: qdrouterd_nv
@ -88,3 +93,16 @@
that:
- hostvars['container1']['qdrouterd_ssl_cert_checksum'] == hostvars['container2']['qdrouterd_ssl_cert_checksum'] == hostvars['container3']['qdrouterd_ssl_cert_checksum']
- hostvars['container1']['qdrouterd_ssl_key_checksum'] == hostvars['container2']['qdrouterd_ssl_key_checksum'] == hostvars['container3']['qdrouterd_ssl_key_checksum']
- name: Create a sasl user
shell: "echo secret | saslpasswd2 -c -p -f /var/lib/qdrouterd/qdrouterd.sasldb -u QPID myguest"
- name: Get sasl user list
command: "sasldblistusers2 -f /var/lib/qdrouterd/qdrouterd.sasldb"
register: sasl_list
changed_when: false
- name: Check for user in sasl list
assert:
that:
- "'myguest@QPID:' in sasl_list.stdout"

View File

@ -14,7 +14,7 @@
# limitations under the License.
# Install Qdrouterd server
- include: common/test-install-qdrouterd.yml
- include: test-install-qdrouterd.yml
# Run functional tests
- include: test-qdrouterd-functional.yml

View File

@ -15,3 +15,6 @@
# Setup the host
- include: common/test-setup-host.yml
# Prepare the containers
- include: common/test-prepare-containers.yml

View File

@ -16,7 +16,7 @@
# Setup the host
- include: common/test-setup-host.yml
# Install previous version qdrouterd server
# Install Qdrouterd server
- include: test-install-qdrouterd.yml
# Run functional tests