Skip to content

Commit

Permalink
Removes -ExcludeDns parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
iainbrighton committed Feb 17, 2016
1 parent 1f9b865 commit 7223fbc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 47 deletions.
16 changes: 3 additions & 13 deletions DSCResources/MSFT_xADDomain/MSFT_xADDomain.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ function Get-TargetResource
[String] $LogPath,

[Parameter()] [ValidateNotNullOrEmpty()]
[String] $SysvolPath,

[Parameter()]
[System.Boolean] $ExcludeDns
[String] $SysvolPath
)

Assert-Module -ModuleName 'ADDSDeployment';
Expand Down Expand Up @@ -140,10 +137,7 @@ function Test-TargetResource
[String] $LogPath,

[Parameter()] [ValidateNotNullOrEmpty()]
[String] $SysvolPath,

[Parameter()]
[System.Boolean] $ExcludeDns
[String] $SysvolPath
)

$targetResource = Get-TargetResource @PSBoundParameters
Expand Down Expand Up @@ -216,10 +210,7 @@ function Set-TargetResource
[String] $LogPath,

[Parameter()] [ValidateNotNullOrEmpty()]
[String] $SysvolPath,

[Parameter()]
[System.Boolean] $ExcludeDns
[String] $SysvolPath
)

# Debug can pause Install-ADDSForest/Install-ADDSDomain, so we remove it.
Expand All @@ -229,7 +220,6 @@ function Set-TargetResource

$installADDSParams = @{
SafeModeAdministratorPassword = $SafemodeAdministratorPassword.Password;
InstallDns = -not $ExcludeDns;
NoRebootOnCompletion = $true;
Force = $true;
}
Expand Down
1 change: 0 additions & 1 deletion DSCResources/MSFT_xADDomain/MSFT_xADDomain.schema.mof
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ class MSFT_xADDomain : OMI_BaseResource
[Write, Description("Path to a directory that contains the domain database")] String DatabasePath;
[Write, Description("Path to a directory for the log file that will be written")] String LogPath;
[Write, Description("Path to a directory where the Sysvol file will be written")] String SysvolPath;
[Write, Description("Specifies the DNS Server service should be not installed")] Boolean ExcludeDns;
};
33 changes: 0 additions & 33 deletions Tests/Unit/MSFT_xADDomain.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -233,22 +233,6 @@ try
Assert-MockCalled Install-ADDSForest -ParameterFilter { $DomainName -eq $testDomainName } -Scope It;
}

It 'Calls "Install-ADDSForest" with "InstallDns" by default, when creating forest' {
Mock Install-ADDSForest -ParameterFilter { $InstallDns -eq $true } { }

Set-TargetResource @newForestParams;

Assert-MockCalled Install-ADDSForest -ParameterFilter { $InstallDns -eq $true } -Scope It;
}

It 'Calls "Install-ADDSForest" with "InstallDns:$false" creating forest, when "ExcludeDns" is specified' {
Mock Install-ADDSForest -ParameterFilter { $InstallDns -eq $false } { }

Set-TargetResource @newForestParams -ExcludeDns $true;

Assert-MockCalled Install-ADDSForest -ParameterFilter { $InstallDns -eq $false } -Scope It;
}

It 'Calls "Install-ADDSForest" with "SafemodeAdministratorPassword" when creating forest' {
Mock Install-ADDSForest -ParameterFilter { $SafemodeAdministratorPassword -eq $testSafemodePassword } { }

Expand Down Expand Up @@ -334,23 +318,6 @@ try
Assert-MockCalled Install-ADDSDomain -ParameterFilter { $DomainType -eq 'ChildDomain' } -Scope It;
}

It 'Calls "Install-ADDSDomain" with "InstallDns" by default, when creating child domain' {
Mock Install-ADDSDomain -ParameterFilter { $InstallDns -eq $true } { }

Set-TargetResource @newDomainParams;

Assert-MockCalled Install-ADDSDomain -ParameterFilter { $InstallDns -eq $true } -Scope It;
}

It 'Calls "Install-ADDSDomain" with "InstallDns:$false" creating child domain, when "ExcludeDns" is specified' {
Mock Install-ADDSDomain -ParameterFilter { $InstallDns -eq $false } { }

Set-TargetResource @newDomainParams -ExcludeDns $true;

Assert-MockCalled Install-ADDSDomain -ParameterFilter { $InstallDns -eq $false } -Scope It;
}


It 'Calls "Install-ADDSDomain" with "SafemodeAdministratorPassword" when creating child domain' {
Mock Install-ADDSDomain -ParameterFilter { $SafemodeAdministratorPassword -eq $testSafemodePassword } { }

Expand Down

0 comments on commit 7223fbc

Please sign in to comment.