Skip to content

Commit

Permalink
AZP: add stable-2.12 to test matrix (#103)
Browse files Browse the repository at this point in the history
* AZP: add stable-2.12 to test matrix

* Update pika version

* Disable integration tests against devel and 2.12 on Ubuntu1804

* Remove extra commented rows

* Change keyserver
  • Loading branch information
Andersson007 authored Oct 25, 2021
1 parent 15bf181 commit 65b0022
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 4 deletions.
38 changes: 36 additions & 2 deletions .azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,19 @@ stages:
test: 'devel/sanity/1'
- name: Units
test: 'devel/units/1'

- stage: Ansible_2_12
displayName: Sanity & Units 2.12
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
targets:
- name: Sanity
test: '2.12/sanity/1'
- name: Units
test: '2.12/units/1'

- stage: Ansible_2_11
displayName: Sanity & Units 2.11
dependsOn: []
Expand All @@ -64,6 +77,7 @@ stages:
test: '2.11/sanity/1'
- name: Units
test: '2.11/units/1'

- stage: Ansible_2_10
displayName: Sanity & Units 2.10
dependsOn: []
Expand All @@ -75,6 +89,7 @@ stages:
test: '2.10/sanity/1'
- name: Units
test: '2.10/units/1'

- stage: Ansible_2_9
displayName: Sanity & Units 2.9
dependsOn: []
Expand All @@ -86,6 +101,7 @@ stages:
test: '2.9/sanity/1'
- name: Units
test: '2.9/units/1'

### Docker
- stage: Docker_devel
displayName: Docker devel
Expand Down Expand Up @@ -114,10 +130,24 @@ stages:
# test: opensuse15py2
#- name: openSUSE 15 py3
# test: opensuse15
- name: Ubuntu 18.04
test: ubuntu1804
#- name: Ubuntu 18.04
# test: ubuntu1804
- name: Ubuntu 20.04
test: ubuntu2004

- stage: Docker_2_12
displayName: Docker 2.12
dependsOn: []
jobs:
- template: templates/matrix.yml
parameters:
testFormat: 2.12/linux/{0}/1
targets:
#- name: Ubuntu 18.04
# test: ubuntu1804
- name: Ubuntu 20.04
test: ubuntu2004

- stage: Docker_2_11
displayName: Docker 2.11
dependsOn: []
Expand Down Expand Up @@ -145,6 +175,7 @@ stages:
test: ubuntu1804
- name: Ubuntu 20.04
test: ubuntu2004

- stage: Docker_2_10
displayName: Docker 2.10
dependsOn: []
Expand Down Expand Up @@ -172,6 +203,7 @@ stages:
test: ubuntu1804
- name: Ubuntu 20.04
test: ubuntu2004

- stage: Docker_2_9
displayName: Docker 2.9
dependsOn: []
Expand Down Expand Up @@ -254,10 +286,12 @@ stages:
condition: succeededOrFailed()
dependsOn:
- Ansible_devel
- Ansible_2_12
- Ansible_2_11
- Ansible_2_10
- Ansible_2_9
- Docker_devel
- Docker_2_12
- Docker_2_11
- Docker_2_10
- Docker_2_9
Expand Down
14 changes: 14 additions & 0 deletions tests/integration/targets/lookup_rabbitmq/tasks/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
rabbit_missing_pika: "{{ lookup('community.rabbitmq.rabbitmq', url='amqp://guest:[email protected]:5672/%2F', queue='hello', count=3) }}"
ignore_errors: yes
register: rabbitmq_missing_pika_error
delegate_to: localhost

- assert:
that:
Expand All @@ -12,12 +13,14 @@
pip:
name: pika<1.0.0,requests
state: latest
delegate_to: localhost

- name: Test that giving an incorrect amqp protocol in URL will error
set_fact:
rabbitmq_test_protocol: "{{ lookup('community.rabbitmq.rabbitmq', url='zzzamqp://guest:[email protected]:5672/%2F', queue='hello', count=3) }}"
ignore_errors: yes
register: rabbitmq_protocol_error
delegate_to: localhost

- assert:
that:
Expand All @@ -29,6 +32,7 @@
rabbitmq_test_protocol: "{{ lookup('community.rabbitmq.rabbitmq', url='amqp://guest:[email protected]:5672/%2F', queue='hello', count=3) }}"
ignore_errors: yes
register: rabbitmq_ip_error
delegate_to: localhost

- assert:
that:
Expand All @@ -40,6 +44,7 @@
rabbitmq_test_protocol: "{{ lookup('community.rabbitmq.rabbitmq') }}"
ignore_errors: yes
register: rabbitmq_params_error
delegate_to: localhost

- assert:
that:
Expand All @@ -51,6 +56,7 @@
rabbitmq_queue_protocol: "{{ lookup('community.rabbitmq.rabbitmq', url='amqp://guest:[email protected]:5672/%2F') }}"
ignore_errors: yes
register: rabbitmq_queue_error
delegate_to: localhost

- assert:
that:
Expand All @@ -61,10 +67,12 @@
rabbitmq_plugin:
names: rabbitmq_management
state: enabled
delegate_to: localhost

- name: Setup test queue
rabbitmq_queue:
name: hello
delegate_to: localhost

- name: Post test message to the exchange (string)
uri:
Expand All @@ -78,6 +86,7 @@
headers:
Content-Type: "application/json"
register: post_data
delegate_to: localhost


- name: Post test message to the exchange (json)
Expand All @@ -92,12 +101,14 @@
headers:
Content-Type: "application/json"
register: post_data_json
delegate_to: localhost

- name: Test retrieve messages
set_fact:
rabbitmq_msg: "{{ lookup('community.rabbitmq.rabbitmq', url='amqp://guest:guest@localhost:5672/%2f/hello', queue='hello') }}"
ignore_errors: yes
register: rabbitmq_msg_error
delegate_to: localhost

- name: Ensure two messages received
assert:
Expand All @@ -120,6 +131,7 @@
rabbitmq_msg: "{{ lookup('community.rabbitmq.rabbitmq', url='amqp://guest:guest@localhost:5672/missing/', queue='hello') }}"
ignore_errors: yes
register: rabbitmq_vhost_error
delegate_to: localhost

- assert:
that:
Expand All @@ -131,8 +143,10 @@
pip:
name: pika,requests
state: absent
delegate_to: localhost

- name: Disable the rabbitmq_management plugin
rabbitmq_plugin:
names: rabbitmq_management
state: disabled
delegate_to: localhost
13 changes: 13 additions & 0 deletions tests/integration/targets/rabbitmq_publish/tasks/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
pip:
name: requests,pika<1.0.0
state: present
delegate_to: localhost

- name: RabbitMQ basic publish test
rabbitmq_publish:
Expand All @@ -10,6 +11,7 @@
body: "Hello world from ansible module rabbitmq_publish"
content_type: "text/plain"
register: rabbit_basic_output1
delegate_to: localhost

- assert:
that:
Expand All @@ -26,6 +28,7 @@
body: "RANDOM QUEUE POST"
content_type: "text/plain"
register: rabbit_random_queue_output
delegate_to: localhost

- assert:
that:
Expand All @@ -38,13 +41,15 @@
copy:
src: "{{ role_path }}/files/image.gif"
dest: "{{ remote_tmp_dir }}/image.gif"
delegate_to: localhost

- name: Publish binary to a queue
rabbitmq_publish:
url: "amqp://guest:guest@localhost:5672/%2F"
queue: publish_test
src: "{{ remote_tmp_dir }}/image.gif"
register: rabbitmq_publish_file
delegate_to: localhost

- assert:
that:
Expand All @@ -60,6 +65,7 @@
body: blah
register: rabbit_basic_fail_output1
ignore_errors: yes
delegate_to: localhost

- assert:
that:
Expand All @@ -73,6 +79,7 @@
src: 'aaaaaaajax-loader.gif'
register: file_missing_fail
ignore_errors: yes
delegate_to: localhost

- assert:
that:
Expand All @@ -90,6 +97,7 @@
queue: publish_test
body: Testing with proto/host/port/username/password/vhost
register: host_port_output
delegate_to: localhost

- assert:
that:
Expand All @@ -106,6 +114,7 @@
body: Testing with proto/host/port/username/password/vhost
ignore_errors: yes
register: host_port_missing_proto_output
delegate_to: localhost

- assert:
that:
Expand All @@ -125,6 +134,7 @@
body: Testing with proto/host/port/username/password/vhost
ignore_errors: yes
register: host_and_url_output
delegate_to: localhost

- assert:
that:
Expand All @@ -141,6 +151,7 @@
secondHeader: Value2
register: test_headers1
ignore_errors: yes
delegate_to: localhost

- name: Publish headers with file
rabbitmq_publish:
Expand All @@ -152,10 +163,12 @@
secondHeader: Value2
register: test_headers2
ignore_errors: yes
delegate_to: localhost

- name: Collect all messages off the publish queue
set_fact:
messages: "{{ lookup('community.rabbitmq.rabbitmq', url='amqp://guest:guest@localhost:5672/%2F', queue='publish_test') }}"
delegate_to: localhost

- name: Check contents of published messages
assert:
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/setup_rabbitmq/tasks/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

- name: Add RabbitMQ main release signing key
apt_key:
keyserver: "hkps://keys.openpgp.org"
keyserver: "keyserver.ubuntu.com"
id: "0x0A9AF2115F4687BD29803A206B73A36E6026DFCA"
state: present
# The key for RPM release signing is different than this one.
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/shippable/shippable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function retry
echo "@* -> ${result}"
done
echo "Command '@*' failed 3 times!"
exit -1
exit 1
}

command -v pip
Expand Down

0 comments on commit 65b0022

Please sign in to comment.