Skip to content

Commit 6570592

Browse files
authored
Fix Integration Tests (#534)
1 parent e77ae57 commit 6570592

4 files changed

Lines changed: 15 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
- `azure-pipelines.yml`
1111
- Remove windows 2019 image fixes [#540](https://github.com/dsccommunity/NetworkingDsc/issues/540).
1212

13+
### Fixed
14+
15+
- Fix integration tests on Server 2022. Fixes [Issue #510](https://github.com/dsccommunity/NetworkingDsc/issues/510).
16+
1317
## [9.1.0] - 2025-05-11
1418

1519
### Changed
@@ -21,7 +25,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2125
- Updated CHANGELOG.md
2226
- Renamed NetworkingDSc to NetworkingDsc in CHANGELOG.md - fixes [Issue #513](https://github.com/dsccommunity/NetworkingDsc/issues/513).
2327
- CI Pipeline
24-
- Updated pipeline files to match current DSC Community patterns - fixes [Issue #528](https://github.com/dsccommunity/NetworkingDsc/issues/528).
28+
- Updated pipeline files to match current DSC Community patterns -
29+
fixes [Issue #528](https://github.com/dsccommunity/NetworkingDsc/issues/528).
2530
- Updated HQRM and build steps to use windows-latest image.
2631
- Update build pipeline to pin GitVersion v5.
2732
- Added Server 2025 into Unit and Integration tests.

source/DSCResources/DSC_NetBios/en-US/DSC_NetBios.strings.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ ConvertFrom-StringData @'
88
TestingNetBiosSettingMessage = Testing NetBIOS configuration for Interface '{0}'.
99
CurrentNetBiosSettingMessage = Current NetBIOS configuration for Interface '{0}' is '{1}'.
1010
InterfaceNotFoundError = Interface '{0}' was not found.
11-
FailedUpdatingNetBiosError = An error result of '{1}' was returned when attemting to set NetBIOS for Interface '{0}' configuration to '{2}'.
11+
FailedUpdatingNetBiosError = An error result of '{1}' was returned when attempting to set NetBIOS for Interface '{0}' configuration to '{2}'.
1212
'@

tests/Integration/DSC_NetAdapterLso.Integration.Tests.ps1

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,18 @@ BeforeDiscovery {
3030
$script:dscResourceName = "DSC_$($script:dscResourceFriendlyName)"
3131

3232
<#
33-
To run these tests a network adapter that has NDIS version of 6 or greater.
34-
If this is not available then the tests will be skipped.
33+
To run these tests a network adapter that has NDIS version of 6 or greater.
34+
If this is not available then the tests will be skipped.
3535
#>
3636
$script:netAdapter = Get-NetAdapter | Where-Object -FilterScript {
3737
$_.NdisVersion -ge 6
3838
} | Select-Object -First 1
3939

40-
if (-not $script:netAdapter)
40+
$script:skip = $true
41+
42+
if ($script:netAdapter)
4143
{
42-
$script:skip = $true
44+
$script:skip = $false
4345
}
4446
}
4547

@@ -56,7 +58,6 @@ BeforeAll {
5658
-TestType 'Integration'
5759

5860
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\TestHelpers\CommonTestHelper.psm1')
59-
6061
}
6162

6263
AfterAll {
@@ -66,7 +67,7 @@ AfterAll {
6667
Restore-TestEnvironment -TestEnvironment $script:testEnvironment
6768
}
6869

69-
Describe 'NetAdapterLso Integration Tests' {
70+
Describe 'NetAdapterLso Integration Tests' -Skip:$script:skip {
7071
BeforeAll {
7172
$script:netAdapter = Get-NetAdapter | Where-Object -FilterScript {
7273
$_.NdisVersion -ge 6

tests/Integration/DSC_NetBios.Integration.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public enum NetBiosSetting
141141
{ Get-DscConfiguration -Verbose -ErrorAction Stop } | Should -Not -Throw
142142
}
143143

144-
It 'Should have set the resource and all setting should match current state' {
144+
It 'Should have set the resource and all settings should match current state' {
145145
$result = Get-DscConfiguration | Where-Object -FilterScript {
146146
$_.ConfigurationName -eq "$($script:dscResourceName)_Config"
147147
}

0 commit comments

Comments
 (0)