Skip to content

Commit

Permalink
Merge pull request #1196 from ykuijs/master
Browse files Browse the repository at this point in the history
Bugfix PR and enabling SP2016/SP2019 unit tests again
  • Loading branch information
ykuijs authored May 11, 2020
2 parents c39203d + 07e8605 commit 9c1259f
Show file tree
Hide file tree
Showing 111 changed files with 824 additions and 639 deletions.
143 changes: 39 additions & 104 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- SharePointDsc
- Added Wiki generation to build task
- Re-enabled Unit tests for Sharepoint 2016 and 2019
- SPAppCatalog
- Added more logging in the Get method to ease troubleshooting

### Changed

- SPWebAppPermissions
- Changed Get method not to throw an exception when the web application
cannot be found to prevent issue

### Fixed

- SharePointDsc generic
- SharePointDsc
- Fixed an issue where Test-SPDscParameterState would throw an error due to duplicate
keys when a desired value is of type CimInstance[] and multiple values
are specified.
- Fixed issue with logging to the custom event log where the event log
wasn't created correctly.
- Fixed various unit tests for Sharepoint 2016 and 2019
- SPConfigWizard
- Fixed a call to Get-SPFarm without loading the snap-in first
- SPInstallLanguagePack
- Fixed issue with detection of Chinese language pack in SharePoint 2019
- SPSite
- Fixed issue where the default groups were checked, even though
that parameter wasn't specified in the config

### Removed

- SharePointDsc
- Removed returning the InstallAccount parameter from all Get methods.
These are not used and only add noise during troubleshooting

## [4.0.0] - 2020-04-28

Expand All @@ -29,6 +59,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- SPTrustedRootAuthority
- It's now possible to specify both CertificateFilePath and CertificateThumbprint
so that the certificate thumbprint can be verified before importing.
- SPTrustedSecurityTokenIssuer
- It's now possible to specify both SigningCertificateFilePath and
SigningCertificateThumbprint so that the certificate thumbprint can be verified
before importing.

The following changes will break v3.x and earlier configurations that use these
resources:

Expand All @@ -39,13 +77,6 @@ resources:
- Discontinued CrawlEverything, CrawlFirstOnly and null as allowable CrawlSetting
values for a SharePoint based content source, requiring CrawlVirtualServers or
CrawlSites
- SPTrustedRootAuthority
- It's now possible to specify both CertificateFilePath and CertificateThumbprint
so that the certificate thumbprint can be verified before importing.
- SPTrustedSecurityTokenIssuer
- It's now possible to specify both SigningCertificateFilePath and
SigningCertificateThumbprint so that the certificate thumbprint can be verified
before importing.
- SPUserProfileServiceApp
- Changed the MySiteHostLocation parameter to a required parameter
- SPWebAppAuthentication
Expand Down Expand Up @@ -128,100 +159,4 @@ resources:
- SPUserProfileProperty
- Fixed typo in user profile property test for IsSearchable.

## [3.7.0.0] - 2019-10-30

### Added

- None

### Changed

- None

### Deprecated

- None

### Removed

- None

### Fixed

- SPConfigWizard
- Fixed issue with incorrect check for upgrade status of server
- SPDistributedCacheService
- Improved error message for inclusion of server name into ServerProvisionOrder
parameters when Present or change to Ensure Absent
- SPFarm
- Removed SingleServer as ServerRole, since this is an invalid role.
- Handle case where null or empty CentralAdministrationUrl is passed in
- Move CentralAdministrationPort validation into parameter definition
to work with ReverseDsc
- Add NotNullOrEmpty parameter validation to CentralAdministrationUrl
- Fixed error when changing developer dashboard display level.
- Add support for updating Central Admin Authentication Method
- SPFarmSolution
- Fix for Web Application scoped solutions.
- SPInstall
- Fixes a terminating error for sources in weird file shares
- Corrected issue with incorrectly detecting SharePoint after it
has been uninstalled
- Corrected issue with detecting a paused installation
- SPInstallLanguagePack
- Fixes a terminating error for sources in weird file shares
- SPInstallPrereqs
- Fixes a terminating error for sources in weird file shares
- SPProductUpdate
- Fixes a terminating error for sources in weird file shares
- Corrected incorrect farm detection, added in earlier bugfix
- SPSite
- Fixed issue with incorrectly updating site OwnerAlias and
SecondaryOwnerAlias
- SPWebAppAuthentication
- Fixes issue where Test method return false on NON-US OS.

### Security

- None

## [3.6.0.0] - 2019-08-07

### Added

- SPTrustedSecurityTokenIssuer
- New resource for configuring OAuth trusts

### Changed

- None

### Deprecated

- None

### Removed

- None

### Fixed

- SharePointDsc generic
- Added new launch actions to vscode to allow code coverage reports for
the current unit test file.
- SPFarm
- Moved check for CentralAdministrationUrl is HTTP to Set method,
to prevent issues with ReverseDsc
- SPInstall
- Updated error code checks to force reboot.
- SPProductUpdate
- Fixes an issue using ShutdownServices when no Farm is available.
- SPTrustedRootAuthority
- Fixes issue where Set method throws an error because the
parameter CertificateFilePath is not read correctly.

### Security

- None

For older change log history see the [historic changelog](HISTORIC_CHANGELOG.md).
60 changes: 60 additions & 0 deletions HISTORIC_CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,65 @@
# Historic change log for SharePointDsc

## [3.7.0.0] - 2019-10-30

### Fixed

- SPConfigWizard
- Fixed issue with incorrect check for upgrade status of server
- SPDistributedCacheService
- Improved error message for inclusion of server name into ServerProvisionOrder
parameters when Present or change to Ensure Absent
- SPFarm
- Removed SingleServer as ServerRole, since this is an invalid role.
- Handle case where null or empty CentralAdministrationUrl is passed in
- Move CentralAdministrationPort validation into parameter definition
to work with ReverseDsc
- Add NotNullOrEmpty parameter validation to CentralAdministrationUrl
- Fixed error when changing developer dashboard display level.
- Add support for updating Central Admin Authentication Method
- SPFarmSolution
- Fix for Web Application scoped solutions.
- SPInstall
- Fixes a terminating error for sources in weird file shares
- Corrected issue with incorrectly detecting SharePoint after it
has been uninstalled
- Corrected issue with detecting a paused installation
- SPInstallLanguagePack
- Fixes a terminating error for sources in weird file shares
- SPInstallPrereqs
- Fixes a terminating error for sources in weird file shares
- SPProductUpdate
- Fixes a terminating error for sources in weird file shares
- Corrected incorrect farm detection, added in earlier bugfix
- SPSite
- Fixed issue with incorrectly updating site OwnerAlias and
SecondaryOwnerAlias
- SPWebAppAuthentication
- Fixes issue where Test method return false on NON-US OS.

## [3.6.0.0] - 2019-08-07

### Added

- SPTrustedSecurityTokenIssuer
- New resource for configuring OAuth trusts

### Fixed

- SharePointDsc generic
- Added new launch actions to vscode to allow code coverage reports for
the current unit test file.
- SPFarm
- Moved check for CentralAdministrationUrl is HTTP to Set method,
to prevent issues with ReverseDsc
- SPInstall
- Updated error code checks to force reboot.
- SPProductUpdate
- Fixes an issue using ShutdownServices when no Farm is available.
- SPTrustedRootAuthority
- Fixes issue where Set method throws an error because the
parameter CertificateFilePath is not read correctly.

## [3.5.0.0] - 2019-06-26

### Added
Expand Down
1 change: 0 additions & 1 deletion Modules/SharePointDsc/DscResource.Tests
Submodule DscResource.Tests deleted from 21ae2d
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ function Get-TargetResource
ApplicationPool = $params.ApplicationPool
DatabaseServer = $params.DatabaseServer
Ensure = "Absent"
InstallAccount = $params.InstallAccount
}
if ($null -eq $serviceApps)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ function Get-TargetResource
Name = $serviceApp.DisplayName
ApplicationPool = $serviceApp.ApplicationPool.Name
Ensure = "Present"
InstallAccount = $params.InstallAccount
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,11 @@ function Get-TargetResource
$wa = Get-SPWebApplication -Identity $aam.PublicUrl

return @{
WebAppName = $wa.DisplayName
Zone = $aam.Zone
Url = $aam.IncomingUrl
Internal = $internal
Ensure = "Present"
InstallAccount = $params.InstallAccount
WebAppName = $wa.DisplayName
Zone = $aam.Zone
Url = $aam.IncomingUrl
Internal = $internal
Ensure = "Present"
}
}
return $result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ function Get-TargetResource
AttemptToClean = $false
NumberOfThreads = 0
TimeoutDuration = 0
InstallAccount = $params.InstallAccount
}
}

Expand All @@ -83,7 +82,6 @@ function Get-TargetResource
AttemptToClean = $admService.AntivirusSettings.CleaningEnabled
NumberOfThreads = $admService.AntivirusSettings.NumberOfThreads
TimeoutDuration = $admService.AntivirusSettings.Timeout.TotalSeconds
InstallAccount = $params.InstallAccount
}
}
return $result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,27 @@ function Get-TargetResource

$site = Get-SPSite $params.SiteUrl -ErrorAction SilentlyContinue
$nullreturn = @{
SiteUrl = $null
InstallAccount = $params.InstallAccount
SiteUrl = $null
}
if ($null -eq $site)
{
Write-Verbose -Message "Could not find site collection"
return $nullreturn
}
$wa = $site.WebApplication
$feature = $wa.Features.Item([Guid]::Parse("f8bea737-255e-4758-ab82-e34bb46f5828"))
if ($null -eq $feature)
{
Write-Verbose -Message "Could not find app catalog feature in site collection"
return $nullreturn
}
if ($site.ID -ne $feature.Properties["__AppCatSiteId"].Value)
{
Write-Verbose -Message "AppCatSiteId does not match Site ID"
return $nullreturn
}
return @{
SiteUrl = $site.Url
InstallAccount = $params.InstallAccount
SiteUrl = $site.Url
}
}
return $result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ function Get-TargetResource
$prefix = Get-SPAppSiteSubscriptionName -ErrorAction Continue

return @{
AppDomain = $appDomain
Prefix = $prefix
InstallAccount = $params.InstallAccount
AppDomain = $appDomain
Prefix = $prefix
}
}
return $result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ function Get-TargetResource
Name = $params.Name
ApplicationPool = $params.ApplicationPool
Ensure = "Absent"
InstallAccount = $params.InstallAccount
}
if ($null -eq $serviceApps)
{
Expand Down Expand Up @@ -96,7 +95,6 @@ function Get-TargetResource
DatabaseName = $serviceApp.Databases.Name
DatabaseServer = $serviceApp.Databases.NormalizedDataSource
Ensure = "Present"
InstallAccount = $params.InstallAccount
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ function Get-TargetResource
$params = $args[0]

$nullreturn = @{
WebAppUrl = $null
InstallAccount = $params.InstallAccount
WebAppUrl = $null
}

$wa = Get-SPWebApplication -Identity $params.WebAppUrl -ErrorAction SilentlyContinue
Expand All @@ -53,7 +52,6 @@ function Get-TargetResource
WebAppUrl = $params.WebAppUrl
AllowAppPurchases = $AllowAppPurchases
AllowAppsForOffice = $AllowAppsForOffice
InstallAccount = $params.InstallAccount
}
}
return $result
Expand Down Expand Up @@ -162,9 +160,9 @@ function Test-TargetResource
{
if ($AllowAppPurchases -ne $CurrentValues.AllowAppPurchases)
{
$message = ("The parameter AllowAppPurchases for web application $WebAppUrl "+ `
"is not in the desired state. Actual: " + `
"$($CurrentValues.AllowAppPurchases), Desired: $AllowAppPurchases")
$message = ("The parameter AllowAppPurchases for web application $WebAppUrl " + `
"is not in the desired state. Actual: " + `
"$($CurrentValues.AllowAppPurchases), Desired: $AllowAppPurchases")
Write-Verbose -Message $message
Add-SPDscEvent -Message $message -EntryType 'Error' -EventID 1 -Source $MyInvocation.MyCommand.Source

Expand All @@ -177,9 +175,9 @@ function Test-TargetResource
{
if ($AllowAppsForOffice -ne $CurrentValues.AllowAppsForOffice)
{
$message = ("The parameter AllowAppsForOffice for web application $WebAppUrl "+ `
"is not in the desired state. Actual: " + `
"$($CurrentValues.AllowAppsForOffice), Desired: $AllowAppsForOffice")
$message = ("The parameter AllowAppsForOffice for web application $WebAppUrl " + `
"is not in the desired state. Actual: " + `
"$($CurrentValues.AllowAppsForOffice), Desired: $AllowAppsForOffice")
Write-Verbose -Message $message
Add-SPDscEvent -Message $message -EntryType 'Error' -EventID 1 -Source $MyInvocation.MyCommand.Source

Expand Down
Loading

0 comments on commit 9c1259f

Please sign in to comment.