-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ActiveDirectoryDsc: Split meta tests and init tests in different AppVeyor jobs #437
Labels
tests
The issue or pull request is about tests only.
Comments
johlju
added
help wanted
The issue is up for grabs for anyone in the community.
tests
The issue or pull request is about tests only.
labels
Jul 17, 2019
johlju
changed the title
xActiveDirectory: Split meta tests and init tests in different AppVeyor jobs
ActiveDirectoryDsc: Split meta tests and init tests in different AppVeyor jobs
Jul 28, 2019
A test was removed from the new resource ADDomainFunctionalLevel since the build worker could not run it due to worng classes was loaded on the buildworker. It works when using the stub classes, but not a build worker that running Windows Server 2012 R2 and loads a class with missing enum types. This issue should resolve this and then this test should be able to be re-added. Context 'When desired domain mode should be ''Windows2016Domain''' {
BeforeAll {
Mock -CommandName Set-ADDomainMode
Mock -CommandName Compare-TargetResourceState -MockWith {
return @(
@{
ParameterName = 'DomainMode'
Actual = 'Windows2012R2Domain'
Expected = 'Windows2016Domain'
InDesiredState = $false
}
)
}
$setTargetResourceParameters = $mockDefaultParameters.Clone()
$setTargetResourceParameters['DomainMode'] = 'Windows2016Domain'
}
It 'Should not throw and call the correct mocks' {
{ Set-TargetResource @setTargetResourceParameters } | Should -Not -Throw
Assert-MockCalled -CommandName Compare-TargetResourceState -Exactly -Times 1 -Scope It
Assert-MockCalled -CommandName Set-ADDomainMode -Exactly -Times 1 -Scope It
}
}
Error on the build worker
|
10 tasks
johlju
added
in progress
The issue is being actively worked on by someone.
and removed
help wanted
The issue is up for grabs for anyone in the community.
labels
Aug 9, 2019
johlju
added a commit
that referenced
this issue
Aug 10, 2019
- Changes to ActiveDirectoryDsc - Split the meta tests and the unit and integration tests in different AppVeyor jobs (issue #437). - Fixed all stub cmdlets and unit tests so the unit test can be run locally without having the ActiveDirectory module installed on the computer. This will also be reflected in the AppVeyor build worker where there will no longer be an ActiveDirectory module installed. This is to make sure that if the unit tests work locally they should also work in the CI pipeline.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are issue running unit tests when stubs are not able to be loaded, see the
#245 (comment). One solution that can mitigate this would be to split the jobs.
See example over at SqlServerDsc https://github.com/PowerShell/SqlServerDsc/blob/dev/appveyor.yml
The text was updated successfully, but these errors were encountered: