Skip to content

Commit

Permalink
Rename lowlydba to sqlserver
Browse files Browse the repository at this point in the history
  • Loading branch information
OsirisDBA committed Sep 12, 2023
1 parent 596e10b commit 1bd8b0f
Show file tree
Hide file tree
Showing 31 changed files with 199 additions and 199 deletions.
26 changes: 13 additions & 13 deletions tests/integration/targets/agent_job/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
description: "This test is not a test."
enabled: true
module_defaults:
lowlydba.sqlserver.agent_job:
sqlserver.dbatools.agent_job:
sql_instance: "{{ sqlserver_instance }}"
sql_username: "{{ sqlserver_username }}"
sql_password: "{{ sqlserver_password }}"
Expand All @@ -20,14 +20,14 @@
# SQL Agent / SMO has delays on returning new data sometimes, and is worse on CI runners -
# so explicitly pre-create the category to make sure we get timely & accurate results later
- name: Prep agent job category
lowlydba.sqlserver.agent_job_category:
sqlserver.dbatools.agent_job_category:
sql_instance: "{{ sqlserver_instance }}"
sql_username: "{{ sqlserver_username }}"
sql_password: "{{ sqlserver_password }}"
category: "{{ category_name }}"

- name: Create agent job
lowlydba.sqlserver.agent_job:
sqlserver.dbatools.agent_job:
register: result
- assert:
that:
Expand All @@ -39,7 +39,7 @@
- result.data.HasSchedule is false

- name: Create agent job step one
lowlydba.sqlserver.agent_job_step:
sqlserver.dbatools.agent_job_step:
sql_instance: "{{ sqlserver_instance }}"
sql_username: "{{ sqlserver_username }}"
sql_password: "{{ sqlserver_password }}"
Expand All @@ -48,7 +48,7 @@
step_id: 1

- name: Create agent job step two
lowlydba.sqlserver.agent_job_step:
sqlserver.dbatools.agent_job_step:
sql_instance: "{{ sqlserver_instance }}"
sql_username: "{{ sqlserver_username }}"
sql_password: "{{ sqlserver_password }}"
Expand All @@ -57,7 +57,7 @@
step_id: 2

- name: Set start job step id
lowlydba.sqlserver.agent_job:
sqlserver.dbatools.agent_job:
sql_instance: "{{ sqlserver_instance }}"
sql_username: "{{ sqlserver_username }}"
sql_password: "{{ sqlserver_password }}"
Expand All @@ -70,7 +70,7 @@
- result is changed

- name: No change
lowlydba.sqlserver.agent_job:
sqlserver.dbatools.agent_job:
sql_instance: "{{ sqlserver_instance }}"
sql_username: "{{ sqlserver_username }}"
sql_password: "{{ sqlserver_password }}"
Expand All @@ -82,7 +82,7 @@
- result is not changed

- name: Remove agent job
lowlydba.sqlserver.agent_job:
sqlserver.dbatools.agent_job:
state: "absent"
register: result
- assert:
Expand All @@ -94,7 +94,7 @@
- result.data.Status == "Dropped"

- name: Create new agent job
lowlydba.sqlserver.agent_job:
sqlserver.dbatools.agent_job:
register: result
- assert:
that:
Expand All @@ -106,7 +106,7 @@
- result is changed

- name: Change agent job
lowlydba.sqlserver.agent_job:
sqlserver.dbatools.agent_job:
owner_login: "sa"
enabled: false
register: result
Expand All @@ -121,7 +121,7 @@
- result is changed

- name: Change agent job
lowlydba.sqlserver.agent_job:
sqlserver.dbatools.agent_job:
enabled: true
register: result
- assert:
Expand All @@ -134,11 +134,11 @@

always:
- name: Cleanup agent job
lowlydba.sqlserver.agent_job:
sqlserver.dbatools.agent_job:
state: "absent"

- name: Cleanup agent job category
lowlydba.sqlserver.agent_job_category:
sqlserver.dbatools.agent_job_category:
sql_instance: "{{ sqlserver_instance }}"
sql_username: "{{ sqlserver_username }}"
sql_password: "{{ sqlserver_password }}"
Expand Down
14 changes: 7 additions & 7 deletions tests/integration/targets/agent_job_category/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
vars:
category_name: "Integration Tests"
module_defaults:
lowlydba.sqlserver.agent_job_category:
sqlserver.dbatools.agent_job_category:
sql_instance: "{{ sqlserver_instance }}"
sql_username: "{{ sqlserver_username }}"
sql_password: "{{ sqlserver_password }}"
category: "{{ category_name }}"
tags: ["agent_job_category"]
block:
- name: Create job category
lowlydba.sqlserver.agent_job_category:
sqlserver.dbatools.agent_job_category:
register: result
- assert:
that:
Expand All @@ -25,14 +25,14 @@
- result.data.JobCount == 0

- name: Create existing job category
lowlydba.sqlserver.agent_job_category:
sqlserver.dbatools.agent_job_category:
register: result
- assert:
that:
- result is not changed

- name: Remove job category in check mode
lowlydba.sqlserver.agent_job_category:
sqlserver.dbatools.agent_job_category:
state: absent
register: result
check_mode: true
Expand All @@ -41,15 +41,15 @@
- result is changed

- name: Remove job category
lowlydba.sqlserver.agent_job_category:
sqlserver.dbatools.agent_job_category:
state: absent
register: result
- assert:
that:
- result is changed

- name: Create new job category
lowlydba.sqlserver.agent_job_category:
sqlserver.dbatools.agent_job_category:
register: result
- assert:
that:
Expand All @@ -65,5 +65,5 @@

always:
- name: Remove job category
lowlydba.sqlserver.agent_job_category:
sqlserver.dbatools.agent_job_category:
state: absent
26 changes: 13 additions & 13 deletions tests/integration/targets/agent_job_schedule/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
start_date_result: "3020-05-25T00:00:00"
end_date_result: "3020-05-25T00:00:00"
module_defaults:
lowlydba.sqlserver.agent_job:
sqlserver.dbatools.agent_job:
sql_instance: "{{ sqlserver_instance }}"
sql_username: "{{ sqlserver_username }}"
sql_password: "{{ sqlserver_password }}"
job: "{{ job_name }}"
lowlydba.sqlserver.agent_job_schedule:
sqlserver.dbatools.agent_job_schedule:
sql_instance: "{{ sqlserver_instance }}"
sql_username: "{{ sqlserver_username }}"
sql_password: "{{ sqlserver_password }}"
Expand All @@ -37,7 +37,7 @@
tags: ["agent_job_schedule"]
block:
- name: Pre-create agent job
lowlydba.sqlserver.agent_job:
sqlserver.dbatools.agent_job:
force: true
state: present
register: result
Expand All @@ -47,7 +47,7 @@
- result.data.Name == "{{ job_name }}"

- name: Create job schedule with force
lowlydba.sqlserver.agent_job_schedule:
sqlserver.dbatools.agent_job_schedule:
schedule: "{{ forced_schedule_name }}"
force: true
state: present
Expand All @@ -63,7 +63,7 @@
- result is changed

- name: Change job schedule & disable
lowlydba.sqlserver.agent_job_schedule:
sqlserver.dbatools.agent_job_schedule:
schedule: "{{ forced_schedule_name }}"
start_date: "30210525"
end_date: "30210525"
Expand All @@ -81,7 +81,7 @@
- result is changed

- name: Enable job schedule
lowlydba.sqlserver.agent_job_schedule:
sqlserver.dbatools.agent_job_schedule:
schedule: "{{ forced_schedule_name }}"
enabled: true
state: present
Expand All @@ -95,7 +95,7 @@
- result is changed

- name: No change
lowlydba.sqlserver.agent_job_schedule:
sqlserver.dbatools.agent_job_schedule:
schedule: "{{ forced_schedule_name }}"
enabled: true
state: present
Expand All @@ -105,7 +105,7 @@
- result is not changed

- name: Remove job schedule
lowlydba.sqlserver.agent_job_schedule:
sqlserver.dbatools.agent_job_schedule:
schedule: "{{ forced_schedule_name }}"
force: true
state: absent
Expand All @@ -115,7 +115,7 @@
- result is changed

- name: Remove non-existent job schedule
lowlydba.sqlserver.agent_job_schedule:
sqlserver.dbatools.agent_job_schedule:
schedule: "{{ forced_schedule_name }}"
force: true
state: absent
Expand All @@ -125,7 +125,7 @@
- result is not changed

- name: Create job schedule in checkmode
lowlydba.sqlserver.agent_job_schedule:
sqlserver.dbatools.agent_job_schedule:
schedule: "{{ forced_schedule_name }}"
start_date: "30210526"
end_date: "30210526"
Expand All @@ -138,7 +138,7 @@
- result is changed

- name: Verify unchanged in checkmode
lowlydba.sqlserver.agent_job_schedule:
sqlserver.dbatools.agent_job_schedule:
schedule: "{{ forced_schedule_name }}"
start_date: "30210526"
end_date: "30210526"
Expand All @@ -159,12 +159,12 @@
always:
# Also cleans up associated schedules
- name: Remove test agent job
lowlydba.sqlserver.agent_job:
sqlserver.dbatools.agent_job:
force: true
state: absent

- name: Remove job schedule
lowlydba.sqlserver.agent_job_schedule:
sqlserver.dbatools.agent_job_schedule:
schedule: "{{ forced_schedule_name }}"
force: true
state: absent
Loading

0 comments on commit 1bd8b0f

Please sign in to comment.