Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Improve HA tests #297

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions tests/tests_configure_ha_cluster_external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
# managed_host1:
# ansible_host: <ip_address1>
# mssql_ha_replica_type: primary
# mssql_version: <version_to_test>
# managed_host2:
# ansible_host: <ip_address2>
# mssql_ha_replica_type: synchronous
# mssql_version: <version_to_test>
# managed_host3:
# ansible_host: <ip_address3>
# mssql_ha_replica_type: witness
# mssql_version: <version_to_test>
---
- name: Verify HA functionality with external clusters and templates
hosts: all
Expand All @@ -27,12 +24,12 @@
mssql_edition: Evaluation
mssql_version: 2022
mssql_manage_firewall: true
__mssql_gather_facts_no_log: true
__mssql_test_confined_supported: "{{
(ansible_distribution in ['CentOS', 'RedHat']) and
(ansible_distribution_major_version is version('9', '>=')) }}"
__mssql_gather_facts_no_log: true
mssql_manage_selinux: false
mssql_run_selinux_confined: false
mssql_manage_selinux: "{{ __mssql_test_confined_supported }}"
mssql_run_selinux_confined: "{{ __mssql_test_confined_supported }}"
mssql_ha_configure: true
mssql_ha_endpoint_port: 5022
mssql_ha_cert_name: ExampleCert
Expand Down Expand Up @@ -165,6 +162,10 @@
- ansible_play_hosts_all | length == 1
- mssql_ha_replica_type is not defined

- name: Load softdog module for stonith to have at least one watchdog
command: modprobe softdog
changed_when: true

- name: Set facts to create test DBs on primary as a pre task
set_fact:
mssql_pre_input_sql_file:
Expand Down
10 changes: 5 additions & 5 deletions tests/tests_configure_ha_cluster_read_scale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
# managed_host1:
# ansible_host: <ip_address1>
# mssql_ha_replica_type: primary
# mssql_version: <version_to_test>
# managed_host2:
# ansible_host: <ip_address2>
# mssql_ha_replica_type: synchronous
# mssql_version: <version_to_test>
# managed_host3:
# ansible_host: <ip_address3>
# mssql_ha_replica_type: asynchronous
# mssql_version: <version_to_test>
---
- name: Verify HA functionality with read-scale clusters
hosts: all
Expand All @@ -27,12 +24,15 @@
mssql_version: 2022
mssql_manage_firewall: true
__mssql_gather_facts_no_log: true
mssql_manage_selinux: false
mssql_run_selinux_confined: false
__mssql_test_confined_supported: "{{
(ansible_distribution in ['CentOS', 'RedHat']) and
(ansible_distribution_major_version is version('9', '>=')) }}"
mssql_manage_selinux: "{{ __mssql_test_confined_supported }}"
mssql_run_selinux_confined: "{{ __mssql_test_confined_supported }}"
mssql_ha_configure: true
mssql_ha_endpoint_port: 5022
mssql_ha_cert_name: ExampleCert
mssql_ha_master_key_password: "p@55w0rD1"

Check warning on line 35 in tests/tests_configure_ha_cluster_read_scale.yml

View workflow job for this annotation

GitHub Actions / Detect non-inclusive language

`master` may be insensitive, use `primary`, `source`, `initiator,requester`, `controller,host`, `director` instead
mssql_ha_private_key_password: "p@55w0rD2"
mssql_ha_reset_cert: false
mssql_ha_endpoint_name: Example_Endpoint
Expand Down
Loading