Skip to content

Commit

Permalink
Merge pull request #24 from NikCharlebois/dev
Browse files Browse the repository at this point in the history
Forcing AppVeyor
  • Loading branch information
NikCharlebois committed Feb 8, 2018
2 parents 181d5a7 + e93bda4 commit ae5537c
Show file tree
Hide file tree
Showing 10 changed files with 195 additions and 29 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ function Get-TargetResource
[OutputType([System.Collections.Hashtable])]
param
(
[parameter(Mandatory = $true)]
[Parameter(Mandatory = $true)]
[ValidateSet("Present","Absent")]
[System.String]
$Ensure,

[parameter(Mandatory = $true)]
[Parameter(Mandatory = $true)]
[System.String]
$BinaryDir,

[parameter(Mandatory = $true)]
[Parameter(Mandatory = $true)]
[System.String]
$Language
)
Expand Down Expand Up @@ -64,16 +64,16 @@ function Set-TargetResource
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidGlobalVars", "")]
param
(
[parameter(Mandatory = $true)]
[Parameter(Mandatory = $true)]
[ValidateSet("Present","Absent")]
[System.String]
$Ensure,

[parameter(Mandatory = $true)]
[Parameter(Mandatory = $true)]
[System.String]
$BinaryDir,

[parameter(Mandatory = $true)]
[Parameter(Mandatory = $true)]
[System.String]
$Language
)
Expand Down Expand Up @@ -127,16 +127,16 @@ function Test-TargetResource
[OutputType([System.Boolean])]
param
(
[parameter(Mandatory = $true)]
[Parameter(Mandatory = $true)]
[ValidateSet("Present","Absent")]
[System.String]
$Ensure,

[parameter(Mandatory = $true)]
[Parameter(Mandatory = $true)]
[System.String]
$BinaryDir,

[parameter(Mandatory = $true)]
[Parameter(Mandatory = $true)]
[System.String]
$Language
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,20 @@ function Get-TargetResource
[OutputType([System.Collections.Hashtable])]
param
(
[Parameter()]
[ValidateSet("Present","Absent")]
[System.String]
$Ensure = "Present",

[Parameter()]
[System.String[]]
$Roles,

[parameter(Mandatory = $true)]
[Parameter(Mandatory = $true)]
[System.String]
$MachineToJoin
)


Import-Module -Name OfficeWebApps -ErrorAction Stop

$officeWebAppsMachine = $null
Expand Down Expand Up @@ -77,14 +78,16 @@ function Set-TargetResource
[CmdletBinding()]
param
(
[Parameter()]
[ValidateSet("Present","Absent")]
[System.String]
$Ensure = "Present",

[Parameter()]
[System.String[]]
$Roles,

[parameter(Mandatory = $true)]
[Parameter(Mandatory = $true)]
[System.String]
$MachineToJoin
)
Expand Down Expand Up @@ -129,14 +132,16 @@ function Test-TargetResource
[OutputType([System.Boolean])]
param
(
[Parameter()]
[ValidateSet("Present","Absent")]
[System.String]
$Ensure = "Present",

[Parameter()]
[System.String[]]
$Roles,

[parameter(Mandatory = $true)]
[Parameter(Mandatory = $true)]
[System.String]
$MachineToJoin
)
Expand Down
16 changes: 15 additions & 1 deletion Tests/TestHarness.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,21 @@ function Invoke-TestHarness
# DSC Common Tests
if ($PSBoundParameters.ContainsKey('DscTestsPath') -eq $true)
{
$testsToRun += @( $DscTestsPath )
$getChildItemParameters = @{
Path = $DscTestsPath
Recurse = $true
Filter = '*.Tests.ps1'
}

# Get all tests '*.Tests.ps1'.
$commonTestFiles = Get-ChildItem @getChildItemParameters

# Remove DscResource.Tests unit and integration tests.
$commonTestFiles = $commonTestFiles | Where-Object -FilterScript {
$_.FullName -notmatch 'DSCResource.Tests\\Tests'
}

$testsToRun += @( $commonTestFiles.FullName )
}

if ($IgnoreCodeCoverage.IsPresent -eq $false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $Script:DSCModuleName = 'OfficeOnlineServerDsc'
$Script:DSCResourceName = 'MSFT_OfficeOnlineServerFarm'
$Global:CurrentWACCmdletModule = $WACCmdletModule

[String] $moduleRoot = Join-Path -Path $PSScriptRoot -ChildPath "..\..\Modules\OfficeOnlineServerDsc" -Resolve
[String] $moduleRoot = Join-Path -Path $PSScriptRoot -ChildPath "..\..\..\Modules\OfficeOnlineServerDsc" -Resolve
if ( (-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResource.Tests'))) -or `
(-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResource.Tests\TestHelper.psm1'))) )
{
Expand All @@ -23,7 +23,7 @@ try
{
InModuleScope $Script:DSCResourceName {

Import-Module (Join-Path $PSScriptRoot "..\..\Modules\OfficeOnlineServerDsc" -Resolve)
Import-Module (Join-Path $PSScriptRoot "..\..\..\Modules\OfficeOnlineServerDsc" -Resolve)
$internalURL = "http://webfarm.contoso.com"
$externalURL = "http://external.contoso.com"
$proxy = 'http://proxy.contoso.com'
Expand Down Expand Up @@ -144,7 +144,7 @@ try

Describe "OfficeOnlineServerFarm [WAC server version $((Get-Item $Global:CurrentWACCmdletModule).Directory.BaseName)]" {

Import-Module (Join-Path $PSScriptRoot "..\..\Modules\OfficeOnlineServerDsc" -Resolve)
Import-Module (Join-Path $PSScriptRoot "..\..\..\Modules\OfficeOnlineServerDsc" -Resolve)
Remove-Module -Name "OfficeWebApps" -Force -ErrorAction SilentlyContinue
Import-Module $Global:CurrentWACCmdletModule -WarningAction SilentlyContinue

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $Script:DSCModuleName = 'OfficeOnlineServerDsc'
$Script:DSCResourceName = 'MSFT_OfficeOnlineServerInstall'
$Global:CurrentWACCmdletModule = $WACCmdletModule

[String] $moduleRoot = Join-Path -Path $PSScriptRoot -ChildPath "..\..\Modules\OfficeOnlineServerDsc" -Resolve
[String] $moduleRoot = Join-Path -Path $PSScriptRoot -ChildPath "..\..\..\Modules\OfficeOnlineServerDsc" -Resolve
if ( (-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResource.Tests'))) -or `
(-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResource.Tests\TestHelper.psm1'))) )
{
Expand All @@ -24,7 +24,7 @@ try
InModuleScope $Script:DSCResourceName {
Describe "OfficeOnlineServerInstall [WAC server version $((Get-Item $Global:CurrentWACCmdletModule).Directory.BaseName)]" {

Import-Module (Join-Path $PSScriptRoot "..\..\Modules\OfficeOnlineServerDsc" -Resolve)
Import-Module (Join-Path $PSScriptRoot "..\..\..\Modules\OfficeOnlineServerDsc" -Resolve)
Remove-Module -Name "OfficeWebApps" -Force -ErrorAction SilentlyContinue
Import-Module $Global:CurrentWACCmdletModule -WarningAction SilentlyContinue

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $Script:DSCModuleName = 'OfficeOnlineServerDsc'
$Script:DSCResourceName = 'MSFT_OfficeOnlineServerInstallLanguagePack'
$Global:CurrentWACCmdletModule = $WACCmdletModule

[String] $moduleRoot = Join-Path -Path $PSScriptRoot -ChildPath "..\..\Modules\OfficeOnlineServerDsc" -Resolve
[String] $moduleRoot = Join-Path -Path $PSScriptRoot -ChildPath "..\..\..\Modules\OfficeOnlineServerDsc" -Resolve
if ( (-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResource.Tests'))) -or `
(-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResource.Tests\TestHelper.psm1'))) )
{
Expand All @@ -24,7 +24,7 @@ try
InModuleScope $Script:DSCResourceName {
Describe "OfficeOnlineServerInstallLanguagePack [WAC server version $((Get-Item $Global:CurrentWACCmdletModule).Directory.BaseName)]" {

Import-Module (Join-Path $PSScriptRoot "..\..\Modules\OfficeOnlineServerDsc" -Resolve)
Import-Module (Join-Path $PSScriptRoot "..\..\..\Modules\OfficeOnlineServerDsc" -Resolve)
Remove-Module -Name "OfficeWebApps" -Force -ErrorAction SilentlyContinue
Import-Module $Global:CurrentWACCmdletModule -WarningAction SilentlyContinue

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $Script:DSCModuleName = 'OfficeOnlineServerDsc'
$Script:DSCResourceName = 'MSFT_OfficeOnlineServerMachine'
$Global:CurrentWACCmdletModule = $WACCmdletModule

[String] $moduleRoot = Join-Path -Path $PSScriptRoot -ChildPath "..\..\Modules\OfficeOnlineServerDsc" -Resolve
[String] $moduleRoot = Join-Path -Path $PSScriptRoot -ChildPath "..\..\..\Modules\OfficeOnlineServerDsc" -Resolve
if ( (-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResource.Tests'))) -or `
(-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResource.Tests\TestHelper.psm1'))) )
{
Expand All @@ -24,7 +24,7 @@ try
InModuleScope $Script:DSCResourceName {
Describe "OfficeOnlineServerMachine [WAC server version $((Get-Item $Global:CurrentWACCmdletModule).Directory.BaseName)]" {

Import-Module (Join-Path $PSScriptRoot "..\..\Modules\OfficeOnlineServerDsc" -Resolve)
Import-Module (Join-Path $PSScriptRoot "..\..\..\Modules\OfficeOnlineServerDsc" -Resolve)
Remove-Module -Name "OfficeWebApps" -Force -ErrorAction SilentlyContinue
Import-Module $Global:CurrentWACCmdletModule -WarningAction SilentlyContinue

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ param(

$Global:CurrentWACCmdletModule = $WACCmdletModule

[String] $moduleRoot = Join-Path -Path $PSScriptRoot -ChildPath "..\..\Modules\OfficeOnlineServerDsc" -Resolve
[String] $moduleRoot = Join-Path -Path $PSScriptRoot -ChildPath "..\..\..\Modules\OfficeOnlineServerDsc" -Resolve
if ( (-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResource.Tests'))) -or `
(-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResource.Tests\TestHelper.psm1'))) )
{
& git @('clone','https://github.com/PowerShell/DscResource.Tests.git',(Join-Path -Path $moduleRoot -ChildPath '\DSCResource.Tests\'))
}

Import-Module (Join-Path $PSScriptRoot "..\..\Modules\OfficeOnlineServerDsc\Modules\OfficeOnlineServerDsc.Util\OfficeOnlineServerDsc.Util.psm1" -Resolve)
Import-Module (Join-Path $PSScriptRoot "..\..\..\Modules\OfficeOnlineServerDsc\Modules\OfficeOnlineServerDsc.Util\OfficeOnlineServerDsc.Util.psm1" -Resolve)

InModuleScope "OfficeOnlineServerDsc.Util" {
Describe "OfficeOnlineServerDsc.Util tests [WAC server version $((Get-Item $Global:CurrentWACCmdletModule).Directory.BaseName)]" {
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 1.2.0.{build}

install:
- git clone -b dev https://github.com/BrianFarnhill/DscResource.Tests
- git clone https://github.com/PowerShell/DscResource.Tests

- npm --silent install

Expand Down

0 comments on commit ae5537c

Please sign in to comment.