Skip to content

Commit ab433fa

Browse files
Update to dbatools.library v2025.7.19 with enhanced assembly management and CI/CD improvements (#9710)
1 parent 04255a4 commit ab433fa

27 files changed

+1308
-224
lines changed

.github/DBATOOLS_LIBRARY_VERSION_MANAGEMENT.md

Lines changed: 464 additions & 0 deletions
Large diffs are not rendered by default.

.github/dbatools-library-version.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"version": "2025.7.19-preview-freshold-20250719213145",
3+
"notes": "Version of dbatools.library to use for CI/CD and development"
4+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/gh-actions.ps1 renamed to .github/scripts/gh-actions.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,23 +256,23 @@ exec sp_addrolemember 'userrole','bob';
256256
$results.Status | Should -Be "Successful"
257257
}
258258

259-
It "connects to Azure" -Skip {
259+
It "connects to Azure" {
260260
$PSDefaultParameterValues.Clear()
261261
$securestring = ConvertTo-SecureString $env:CLIENTSECRET -AsPlainText -Force
262262
$azurecred = New-Object PSCredential -ArgumentList $env:CLIENTID, $securestring
263263
Connect-DbaInstance -SqlInstance dbatoolstest.database.windows.net -SqlCredential $azurecred -Tenant $env:TENANTID | Select-Object -ExpandProperty ComputerName | Should -Be "dbatoolstest.database.windows.net"
264264
Connect-DbaInstance -SqlInstance "Server=dbatoolstest.database.windows.net; Authentication=Active Directory Service Principal; Database=test; User Id=$env:CLIENTID; Password=$env:CLIENTSECRET;" | Select-Object -ExpandProperty ComputerName | Should -Be "dbatoolstest.database.windows.net"
265265
}
266266

267-
It "gets a database from Azure" -Skip {
267+
It "gets a database from Azure" {
268268
$PSDefaultParameterValues.Clear()
269269
$securestring = ConvertTo-SecureString $env:CLIENTSECRET -AsPlainText -Force
270270
$azurecred = New-Object PSCredential -ArgumentList $env:CLIENTID, $securestring
271271
$server = Connect-DbaInstance -SqlInstance dbatoolstest.database.windows.net -SqlCredential $azurecred -Tenant $env:TENANTID
272272
(Get-DbaDatabase -SqlInstance $server -Database test).Name | Should -Be "test"
273273
}
274274

275-
It "tests Get-DbaLastGoodCheckDb against Azure" -Skip {
275+
It "tests Get-DbaLastGoodCheckDb against Azure" {
276276
$PSDefaultParameterValues.Clear()
277277
$securestring = ConvertTo-SecureString $env:CLIENTSECRET -AsPlainText -Force
278278
$azurecred = New-Object PSCredential -ArgumentList $env:CLIENTID, $securestring
@@ -297,4 +297,4 @@ Need to add tests for CSV
297297
'Remove-DbaDatabaseSafely',
298298
'Test-DbaManagementObject',
299299
'Export-DbaDacPackage'
300-
#>
300+
#>

tests/gh-macactions.ps1 renamed to .github/scripts/gh-macactions.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Describe "Integration Tests" -Tag "IntegrationTests" {
3636
$null = Remove-DbaDatabase -Database $db.Name
3737
}
3838

39-
It "connects to Azure" -Skip {
39+
It "connects to Azure" {
4040
$PSDefaultParameterValues.Clear()
4141
$securestring = ConvertTo-SecureString $env:CLIENTSECRET -AsPlainText -Force
4242
$azurecred = New-Object PSCredential -ArgumentList $env:CLIENTID, $securestring

tests/gh-winactions.ps1 renamed to .github/scripts/gh-winactions.ps1

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
Describe "Integration Tests" -Tag "IntegrationTests" {
22
BeforeAll {
3-
$PSDefaultParameterValues["*:SqlInstance"] = "(localdb)\MSSQLLocalDB"
3+
# if desktop then use localdb if desktop then use full
4+
if ($PSVersionTable.PSEdition -eq "Core") {
5+
# [New-DbaDatabase] Failure | LocalDB is not supported on this platform.
6+
$password = ConvertTo-SecureString "dbatools.I0" -AsPlainText -Force
7+
$cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "sa", $password
8+
$PSDefaultParameterValues["*:SqlInstance"] = "localhost"
9+
$PSDefaultParameterValues["*:SqlCredential"] = $cred
10+
} else {
11+
$PSDefaultParameterValues["*:SqlInstance"] = "(localdb)\MSSQLLocalDB"
12+
}
13+
414
$PSDefaultParameterValues["*:Confirm"] = $false
515
#$PSDefaultParameterValues["*:WarningAction"] = "SilentlyContinue"
616
$global:ProgressPreference = "SilentlyContinue"
@@ -33,15 +43,15 @@ Describe "Integration Tests" -Tag "IntegrationTests" {
3343
$null = Remove-DbaDatabase -Database $db.Name
3444
}
3545

36-
It "connects to Azure using tenant and client id + client secret" -Skip {
46+
It "connects to Azure using tenant and client id + client secret" {
3747
$PSDefaultParameterValues.Clear()
3848
$securestring = ConvertTo-SecureString $env:CLIENTSECRET -AsPlainText -Force
3949
$azurecred = New-Object PSCredential -ArgumentList $env:CLIENTID, $securestring
4050
Connect-DbaInstance -SqlInstance dbatoolstest.database.windows.net -SqlCredential $azurecred -Tenant $env:TENANTID -Verbose | Select-Object -ExpandProperty ComputerName | Should -Be "dbatoolstest.database.windows.net"
4151
}
4252

4353

44-
It "connects to Azure using a query string" -Skip {
54+
It "connects to Azure using a query string" {
4555
# this doesn't work on github, it throws
4656
# Method not found: 'Microsoft.Identity.Client.AcquireTokenByUsernamePasswordParameterBuilder'
4757
if ($PSVersionTable.PSEdition -eq "Core") {
@@ -53,11 +63,11 @@ Describe "Integration Tests" -Tag "IntegrationTests" {
5363
}
5464
}
5565

56-
It "gets a database from Azure" -Skip {
66+
It "gets a database from Azure" {
5767
$PSDefaultParameterValues.Clear()
5868
$securestring = ConvertTo-SecureString $env:CLIENTSECRET -AsPlainText -Force
5969
$azurecred = New-Object PSCredential -ArgumentList $env:CLIENTID, $securestring
6070
$server = Connect-DbaInstance -SqlInstance dbatoolstest.database.windows.net -SqlCredential $azurecred -Tenant $env:TENANTID
6171
(Get-DbaDatabase -SqlInstance $server -Database test).Name | Should -Be "test"
6272
}
63-
}
73+
}

0 commit comments

Comments
 (0)