From 2c3efea14bcfce8810de650111176a704a902e07 Mon Sep 17 00:00:00 2001 From: Andrew Klychkov Date: Thu, 16 Jul 2020 12:24:04 +0300 Subject: [PATCH] Test of using FQCN for some builtin plugins (#660) --- .../targets/connection/test_connection.yml | 2 +- .../tasks/postgresql_slot_initial.yml | 2 +- .../tasks/postgresql_user_initial.yml | 16 ++++++++-------- .../tasks/setup_redis_cluster.yml | 4 ++-- .../supervisorctl/tasks/start_supervisord.yml | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/integration/targets/connection/test_connection.yml b/tests/integration/targets/connection/test_connection.yml index 21699422ff..a662e576ab 100644 --- a/tests/integration/targets/connection/test_connection.yml +++ b/tests/integration/targets/connection/test_connection.yml @@ -40,4 +40,4 @@ action: "{{ action_prefix }}file path={{ remote_tmp }}-汉语 state=absent" ### test wait_for_connection plugin - - wait_for_connection: + - ansible.builtin.wait_for_connection: diff --git a/tests/integration/targets/postgresql_slot/tasks/postgresql_slot_initial.yml b/tests/integration/targets/postgresql_slot/tasks/postgresql_slot_initial.yml index 711889b0f6..4f009ac028 100644 --- a/tests/integration/targets/postgresql_slot/tasks/postgresql_slot_initial.yml +++ b/tests/integration/targets/postgresql_slot/tasks/postgresql_slot_initial.yml @@ -35,7 +35,7 @@ when: (ansible_facts.distribution_major_version != '8' and ansible_facts.distribution == 'CentOS') or ansible_facts.distribution != 'CentOS' - name: postgresql_slot - pause between stop and start PostgreSQL - pause: + ansible.builtin.pause: seconds: 5 - name: postgresql_slot - start PostgreSQL diff --git a/tests/integration/targets/postgresql_user/tasks/postgresql_user_initial.yml b/tests/integration/targets/postgresql_user/tasks/postgresql_user_initial.yml index fd5afd494a..79be2237e1 100644 --- a/tests/integration/targets/postgresql_user/tasks/postgresql_user_initial.yml +++ b/tests/integration/targets/postgresql_user/tasks/postgresql_user_initial.yml @@ -3,11 +3,11 @@ # # unencrypted values are not supported on newer versions # do not run the encrypted: no tests if on 10+ -- set_fact: +- ansible.builtin.set_fact: encryption_values: - 'yes' -- set_fact: +- ansible.builtin.set_fact: encryption_values: '{{ encryption_values + ["no"]}}' when: postgres_version_resp.stdout is version('10', '<=') @@ -22,7 +22,7 @@ # BYPASSRLS role attribute was introduced in PostgreSQL 9.5, so # we want to test attribute management differently depending # on the version. -- set_fact: +- ansible.builtin.set_fact: bypassrls_supported: "{{ postgres_version_resp.stdout is version('9.5.0', '>=') }}" # test 'no_password_change' and 'role_attr_flags' parameters @@ -67,7 +67,7 @@ shell: echo "select datname from pg_database where datname = '{{ db_name }}';" | psql -d postgres register: result -- assert: +- ansible.builtin.assert: that: - "result.stdout_lines[-1] == '(1 row)'" @@ -89,7 +89,7 @@ shell: echo "select * from pg_user where usename='{{ db_user2 }}';" | psql -d postgres register: result -- assert: +- ansible.builtin.assert: that: - "result.stdout_lines[-1] == '(1 row)'" @@ -111,7 +111,7 @@ shell: echo "select datacl from pg_database where datname='{{ db_name }}';" | psql {{ db_name }} register: result_database -- assert: +- ansible.builtin.assert: that: - "result_database.stdout_lines[-1] == '(1 row)'" - "db_user2 ~ '=Cc' in result_database.stdout" @@ -133,7 +133,7 @@ shell: echo "select * from pg_user where usename='{{ db_user2 }}';" | psql -d postgres register: result -- assert: +- ansible.builtin.assert: that: - "result.stdout_lines[-1] == '(0 rows)'" @@ -151,6 +151,6 @@ shell: echo "select datname from pg_database where datname = '{{ db_name }}';" | psql -d postgres register: result -- assert: +- ansible.builtin.assert: that: - "result.stdout_lines[-1] == '(0 rows)'" diff --git a/tests/integration/targets/setup_redis_replication/tasks/setup_redis_cluster.yml b/tests/integration/targets/setup_redis_replication/tasks/setup_redis_cluster.yml index 6f6837e5cf..2445ba242a 100644 --- a/tests/integration/targets/setup_redis_replication/tasks/setup_redis_cluster.yml +++ b/tests/integration/targets/setup_redis_replication/tasks/setup_redis_cluster.yml @@ -87,7 +87,7 @@ shell: "{{ redis_bin[ansible_distribution] }} {{ slave_conf }} --slaveof 127.0.0.1 {{ master_port }}" - name: Wait for redis master to be started - wait_for: + ansible.builtin.wait_for: host: 127.0.0.1 port: "{{ master_port }}" state: started @@ -96,7 +96,7 @@ timeout: 30 - name: Wait for redis slave to be started - wait_for: + ansible.builtin.wait_for: host: 127.0.0.1 port: "{{ slave_port }}" state: started diff --git a/tests/integration/targets/supervisorctl/tasks/start_supervisord.yml b/tests/integration/targets/supervisorctl/tasks/start_supervisord.yml index 49559cf07d..9067a27322 100644 --- a/tests/integration/targets/supervisorctl/tasks/start_supervisord.yml +++ b/tests/integration/targets/supervisorctl/tasks/start_supervisord.yml @@ -2,7 +2,7 @@ command: 'supervisord -c {{ remote_dir }}/supervisord.conf' - name: wait_for supervisord - wait_for: + ansible.builtin.wait_for: port: 9001 host: 127.0.0.1 timeout: 15