Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
db0ff34
First test of new AppVeyor.psm1 in DSCResource.Tests
PlagueHO Jan 21, 2017
106f26f
Change paths passed to AppVeyor functions
PlagueHO Jan 21, 2017
39f07df
Clean up xNetworking.TestHarness path
PlagueHO Jan 21, 2017
bffa23b
Fix typo
PlagueHO Jan 21, 2017
84ae1e8
Fix up Test Harness
PlagueHO Jan 21, 2017
e121614
Correct path to Main Modules Folder
PlagueHO Jan 21, 2017
7e9123b
Revert some changes in Test Harness
PlagueHO Jan 21, 2017
113fac4
Fix up Test Harness again
PlagueHO Jan 21, 2017
87f7ed6
Move Example and MD tests into DSCResources.Tests
PlagueHO Jan 24, 2017
0c4a81a
Merge branch 'dev' into Use-AppVeyor-Module
PlagueHO Jan 24, 2017
db9ccb5
Remove files that are moved to DSCResource.tests
PlagueHO Feb 1, 2017
72f9dc2
Remove files that should not be tracked
PlagueHO Feb 1, 2017
4ebfe80
Remove TestResults.xml
PlagueHO Feb 2, 2017
04d2382
Merge upstream
PlagueHO Feb 2, 2017
4e21655
Rename task names
PlagueHO Feb 5, 2017
63609af
Convert to use PowerShell/DSCResource.tests
PlagueHO Feb 7, 2017
d12db65
Added changelog into
PlagueHO Feb 7, 2017
f43fefa
Opt-in to Example and Markdown tests
PlagueHO Feb 9, 2017
b77c268
Changes as per PR
PlagueHO Feb 13, 2017
1dc19cc
Changes as per PR comments
PlagueHO Feb 14, 2017
14c19bd
Run test on my branch of DSCResource.tests
PlagueHO Feb 14, 2017
5b22e1a
Removed extra blank line
PlagueHO Feb 14, 2017
3b81c69
- Added CodeCov.io support.
PlagueHO Feb 15, 2017
8c8dbfd
Convert to use DSCResources.test back to PowerShell team version
PlagueHO Feb 16, 2017
64f0d27
Merge pull request #186 from PlagueHO/Use-AppVeyor-Module
PlagueHO Feb 19, 2017
0757073
Test Create File
edycus Mar 9, 2017
dfee48a
Add repository for power management of the network adapter
edycus Mar 9, 2017
ed0abff
Delete test file
edycus Mar 9, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .MetaTestOptIn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
"Common Tests - Validate Markdown Files",
"Common Tests - Validate Example Files"
]
127 changes: 0 additions & 127 deletions .appveyor/appveyor.psm1

This file was deleted.

26 changes: 26 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
codecov:
notify:
require_ci_to_pass: no
# dev should be the baseline for reporting
branch: dev

comment:
layout: "reach, diff"
behavior: default

coverage:
range: 50..80
round: down
precision: 0

status:
project:
default:
# Set the overall project code coverage requirement to 70%
target: 70
patch:
default:
# Set the pull request requirement to not regress overall coverage by more than 5%
# and let codecov.io set the goal for the code changed in the patch.
target: auto
threshold: 5
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
.vs
.psproj
.sln
DscResource.Tests
DscResource.Tests/*
Modules/xNetworking/DscResource.Tests
Modules/xNetworking/DscResource.Tests/*
node_modules
node_modules/*
markdownissues.txt
TestResults.xml
8 changes: 0 additions & 8 deletions .markdownlint.json

This file was deleted.

13 changes: 10 additions & 3 deletions .vscode/RunAllTests.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
Import-Module (Join-Path $PSScriptRoot "..\Tests\xNetworking.TestHarness.psm1" -Resolve)
[string] $repoRoot = Split-Path -Path (Split-Path -Path $Script:MyInvocation.MyCommand.Path)
if ( (-not (Test-Path -Path (Join-Path -Path $repoRoot -ChildPath 'DSCResource.Tests'))) -or `
(-not (Test-Path -Path (Join-Path -Path $repoRoot -ChildPath 'DSCResource.Tests\TestHelper.psm1'))) )
{
& git @('clone','https://github.com/PowerShell/DscResource.Tests.git',(Join-Path -Path $repoRoot -ChildPath '\DSCResource.Tests\'))
}

Import-Module (Join-Path $PSScriptRoot "..\Tests\TestHarness.psm1" -Resolve)
$dscTestsPath = Join-Path -Path $PSScriptRoot `
-ChildPath "..\Modules\xNetworking\DscResource.Tests\Meta.Tests.ps1"
Invoke-xNetworkingTest -DscTestsPath $dscTestsPath
-ChildPath "..\Modules\xNetworking\DscResource.Tests\Meta.Tests.ps1"
Invoke-TestHarness -DscTestsPath $dscTestsPath
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

- Converted to use AppVeyor.psm1 in DSCResource.Tests repository.
- Converted to use Example and Markdown tests in DSCResource.Tests repository.
- Added CodeCov.io support.

## 3.2.0.0

- Fixed typo in the example's Action property from "Blocked" (which isn't a valid
Expand Down
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# xNetworking

[![Build status](https://ci.appveyor.com/api/projects/status/obmudad7gy8usbx2/branch/master?svg=true)](https://ci.appveyor.com/project/PowerShell/xnetworking/branch/master)
[![codecov](https://codecov.io/gh/PowerShell/xNetworking/branch/master/graph/badge.svg)](https://codecov.io/gh/PowerShell/xNetworking)

The **xNetworking** module contains the following resources:

Expand Down
105 changes: 0 additions & 105 deletions Tests/Helper/xNetworking.Helper.Tests.ps1

This file was deleted.

46 changes: 13 additions & 33 deletions Tests/xNetworking.TestHarness.psm1 → Tests/TestHarness.psm1
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
function Invoke-xNetworkingTest
function Invoke-TestHarness
{
[CmdletBinding()]
param
(
[System.String] $TestResultsFile,
[System.String]
$TestResultsFile,

[System.String] $DscTestsPath
[System.String]
$DscTestsPath
)

Write-Verbose -Message 'Commencing all xNetworking tests'

$repoDir = Join-Path -Path $PSScriptRoot -ChildPath "..\" -Resolve
$repoDir = Join-Path -Path $PSScriptRoot -ChildPath '..\' -Resolve

$testCoverageFiles = @()
Get-ChildItem -Path "$repoDir\modules\xNetworking\DSCResources\**\*.psm1" -Recurse | ForEach-Object {
Expand All @@ -28,45 +30,23 @@ function Invoke-xNetworkingTest
Import-Module -Name "$repoDir\modules\xNetworking\xNetworking.psd1"
$testsToRun = @()

# Helper tests

$helperTests = (Get-ChildItem -Path (Join-Path -Path $repoDir -ChildPath '\Tests\Helper\')).Name

$helperTests | ForEach-Object {
$testsToRun += @(@{
'Path' = "$repoDir\Tests\Helper\$_"
})
}

# Run Unit Tests
$unitTests = (Get-ChildItem (Join-Path -Path $repoDir -ChildPath '\Tests\Unit\')).Name

$unitTests | ForEach-Object {
$testsToRun += @(@{
'Path' = "$repoDir\Tests\Unit\$_"
})
}
$unitTestsPath = Join-Path -Path $repoDir -ChildPath 'Tests\Unit'
$testsToRun += @( (Get-ChildItem -Path $unitTestsPath).FullName )

# Integration Tests
$integrationTests = (Get-ChildItem -Path (Join-Path -Path $repoDir -ChildPath '\Tests\Integration\') -Filter '*.Tests.ps1').Name

$integrationTests | ForEach-Object {
$testsToRun += @(@{
'Path' = "$repoDir\Tests\Integration\$_"
})
}
$integrationTestsPath = Join-Path -Path $repoDir -ChildPath 'Tests\Integration'
$testsToRun += @( (Get-ChildItem -Path $integrationTestsPath -Filter '*.Tests.ps1').FullName )

# DSC Common Tests
if ($PSBoundParameters.ContainsKey('DscTestsPath') -eq $true) {
$testsToRun += @{
'Path' = $DscTestsPath
}
if ($PSBoundParameters.ContainsKey('DscTestsPath') -eq $true)
{
$testsToRun += @( $DscTestsPath )
}

$results = Invoke-Pester -Script $testsToRun `
-CodeCoverage $testCoverageFiles `
-PassThru @testResultSettings

return $results

}
Loading