diff --git a/tests/integration/targets/win_availability_group/tasks/main.yml b/tests/integration/targets/win_availability_group/tasks/main.yml index 1f486867..9f495d7e 100644 --- a/tests/integration/targets/win_availability_group/tasks/main.yml +++ b/tests/integration/targets/win_availability_group/tasks/main.yml @@ -112,6 +112,23 @@ that: - result is changed + - name: Create Contained availability group + lowlydba.sqlserver.availability_group: + contained_availability_group: true + ag_name: "{{ ag_name}}-contained" + + - name: create Listenr on contained + lowlydba.sqlserver.ag_listener: + ag_name: "{{ ag_name }}-contained" + sql_instance: "{{ sqlserver_instance }}" + listener_name: "{{ ag_name }}-lis-contained" + + - name: Create login on contained availability group + lowlydba.sqlserver.login: + sql_instance: "{{ ag_name }}-lis-contained" + login: TheIntern + password: ReallyComplexStuff12345! + always: - name: Drop availability group lowlydba.sqlserver.availability_group: diff --git a/tests/integration/targets/win_contained_availability_group/meta/main.yml b/tests/integration/targets/win_contained_availability_group/meta/main.yml deleted file mode 100644 index a3309752..00000000 --- a/tests/integration/targets/win_contained_availability_group/meta/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -dependencies: - - setup_sqlserver_test_plugins diff --git a/tests/integration/targets/win_contained_availability_group/tasks/main.yml b/tests/integration/targets/win_contained_availability_group/tasks/main.yml deleted file mode 100644 index c9e7ed5d..00000000 --- a/tests/integration/targets/win_contained_availability_group/tasks/main.yml +++ /dev/null @@ -1,64 +0,0 @@ ---- -- name: Var block - vars: - ag_name: "containedAG" - cluster_type: "None" - contained_availability_group: true - force: false - module_defaults: - lowlydba.sqlserver.availability_group: - sql_instance: "{{ sqlserver_instance }}" - sql_username: "{{ sqlserver_username }}" - sql_password: "{{ sqlserver_password }}" - ag_name: "{{ ag_name }}" - cluster_type: "{{ cluster_type }}" - failover_mode: "{{ failover_mode }}" - dtc_support_enabled: "{{ dtc_support_enabled }}" - availability_mode: "{{ availability_mode }}" - seeding_mode: "{{ seeding_mode }}" - database_health_trigger: "{{ database_health_trigger }}" - database: "{{ database }}" - healthcheck_timeout: "{{ healthcheck_timeout }}" - basic_availability_group: "{{ basic_availability_group }}" - contained_availability_group: "{{ contained_availability_group }}" - force: "{{ force }}" - allow_null_backup: true - failure_condition_level: "{{ failure_condition_level }}" - tags: ["availability_group"] - block: - - name: Enable hadr - lowlydba.sqlserver.hadr: - sql_instance: "{{ sqlserver_instance }}" - sql_username: "{{ sqlserver_username }}" - sql_password: "{{ sqlserver_password }}" - enabled: true - force: true - - - name: Create availability group - lowlydba.sqlserver.availability_group: - register: result - - assert: - that: - - result.data.ComputerName != None - - result.data.InstanceName != None - - result.data.SqlInstance != None - - result.data.AvailabilityGroup == "{{ ag_name }}" - - result.data.ClusterType == "{{ cluster_type }}" - - result.data.AvailabilityReplicas != None - - result is changed - - result.data.containedAvailabilityGroup is true - - - name: Create listener - lowlydba.sqlserver.ag_listener: - ag_name: "{{ ag_name }}" - sql_instance: "{{ sqlserver_instance }}" - listener_name: "{{ ag_name }}-lis" - - - name: Create login on contained AG - lowlydba.sqlserver.login: - sql_instance: "{{ ag_name }}-lis" - login: TheIntern - password: ReallyComplexStuff12345! - - assert: - that: - - result.data != None