Skip to content

Commit

Permalink
FIx review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju committed Jan 22, 2023
1 parent e2b99fd commit e830ee7
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 37 deletions.
1 change: 0 additions & 1 deletion RequiredModules.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,4 @@
PSDscResources = '2.12.0.0'
StorageDsc = '4.9.0.0'
NetworkingDsc = '7.4.0.0'
PowerShellGet = '2.1.2'
}
5 changes: 2 additions & 3 deletions source/DSCResources/DSC_SqlProtocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ For more information about protocol properties look at the following articles:
not have access then the correct credential must be provided in
the built-in parameter `PSDscRunAsCredential`. If not the following error
can appear; `An internal error occurred`.

## Known issues

* When using the resource against an SQL Server 2022 instance, the module
_SqlServer_ v22.0.49-preview or newer must be installed.

## Known issues

All issues are not listed here, see [here for all open issues](https://github.com/dsccommunity/SqlServerDsc/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+SqlProtocol).
5 changes: 2 additions & 3 deletions source/DSCResources/DSC_SqlProtocolTcpIp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ For more information about static and dynamic ports read the article
TcpIp protocol must also set the **Listen All** property to **No**.
This can be done with the resource `SqlProtocol` using the
parameter `ListenOnAllIpAddresses`.

## Known issues

* When using the resource against an SQL Server 2022 instance, the module
_SqlServer_ v22.0.49-preview or newer must be installed.

## Known issues

All issues are not listed here, see [here for all open issues](https://github.com/dsccommunity/SqlServerDsc/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+SqlProtocolTcpIp).
22 changes: 0 additions & 22 deletions source/DSCResources/DSC_SqlRS/DSC_SqlRS.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -477,28 +477,6 @@ function Set-TargetResource
ServerInstance = $reportingServicesConnection
}

<#
TODO: This should be made an optional parameter.
This changes the kind of encryption to use when connecting to SQL Server.
Default is that encryption is turned on, which generates the following
exception when the correct certificates are not enabled:
"A connection was successfully established with the server, but then
an error occurred during the login process. (provider: SSL Provider,
error: 0 - The certificate chain was issued by an authority that is
not trusted.)"
This value maps to the Encrypt property SqlConnectionEncryptOption
on the SqlConnection object of the Microsoft.Data.SqlClient driver.
When not specified, the default value is `Mandatory`.
This parameter is new in the module SqlServer v22.x.
For more details, see the article [Connect to SQL Server with strict encryption](https://learn.microsoft.com/en-us/sql/relational-databases/security/networking/connect-with-strict-encryption?view=sql-server-ver16)
and [Configure SQL Server Database Engine for encrypting connections](https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-sql-server-encryption?view=sql-server-ver16).
#>
if ($PSBoundParameters.ContainsKey('Encrypt'))
{
$commandInvokeSqlCmd = Get-Command -Name 'Invoke-SqlCmd'
Expand Down
5 changes: 2 additions & 3 deletions source/DSCResources/DSC_SqlReplication/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ and publishing.

* Target machine must be running Windows Server 2012 or later.
* Target machine must be running SQL Server 2012 or later.

## Known issues

* When using the resource against an SQL Server 2022 instance, the module
_SqlServer_ v22.0.49-preview or newer must be installed.

## Known issues

All issues are not listed here, see [here for all open issues](https://github.com/dsccommunity/SqlServerDsc/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+SqlReplication).
5 changes: 2 additions & 3 deletions source/DSCResources/DSC_SqlServiceAccount/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ Server services.

* Target machine must have access to the SQLPS PowerShell module or the SqlServer
PowerShell module.

## Known issues

* When using the resource against an SQL Server 2022 instance, the module
_SqlServer_ v22.0.49-preview or newer must be installed.

## Known issues

All issues are not listed here, see [here for all open issues](https://github.com/dsccommunity/SqlServerDsc/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+SqlServiceAccount).
2 changes: 1 addition & 1 deletion tests/Integration/DSC_SqlScriptQuery.config.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Configuration DSC_SqlScriptQuery_RunSqlScriptQueryAsWindowsUser_Config

<#
.SYNOPSIS
Runs the SQL query as a SQL login.F
Runs the SQL query as a SQL login.
#>
Configuration DSC_SqlScriptQuery_RunSqlScriptQueryAsSqlUser_Config
{
Expand Down
6 changes: 5 additions & 1 deletion tests/Integration/DSC_SqlSetup.config.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ else
# Features CONN, BC, SDK, SNAC_SDK, DREPLAY_CLT, DREPLAY_CTLR are no longer supported in 2022.
SupportedFeatures = 'SQLENGINE,REPLICATION'

SqlServerModuleVersion = '22.0.49-preview' #21.1.18256
SqlServerModuleVersion = '22.0.49-preview'
}
}

Expand Down Expand Up @@ -301,6 +301,10 @@ Configuration DSC_SqlSetup_CreateDependencies_Config
.NOTES
This module might already be installed on the build worker. This is needed
to install SQL Server Analysis Services instances.
The SqlServer module is purposely not added to 'RequiredModule.psd1' so
that it does not conflict with the SqlServerStubs module that is used by
unit tests.
#>
Configuration DSC_SqlSetup_InstallSqlServerModule_Config
{
Expand Down
13 changes: 13 additions & 0 deletions tests/Integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ the build worker online after the build finishes uncomment the line in
`appveyor.yml`. The build worker will always be terminated after 60 minutes
which is the run time open source projects gets.

## SqlServer module

There is a difference what module version of [_SqlServer_](https://www.powershellgallery.com/packages/SqlServer)
is used for what SQL Server release. The integration tests for SqlSetup_
installs the required module version.

SQL Server release | SqlServer module version
--- | ---
SQL Server 2016 | 21.1.18256
SQL Server 2017 | 21.1.18256
SQL Server 2019 | 21.1.18256
SQL Server 2022 | 22.0.49-preview

## Depends On

For it to be easier to write integration tests for a resource that depends on
Expand Down

0 comments on commit e830ee7

Please sign in to comment.