Skip to content
This repository was archived by the owner on Mar 11, 2020. It is now read-only.

Commit 9ac8738

Browse files
committed
Fix unit tests
Signed-off-by: Elton Stoneman <[email protected]>
1 parent 8f62efc commit 9ac8738

File tree

11 files changed

+43
-10
lines changed

11 files changed

+43
-10
lines changed

Functions/Private/Artifacts/AddRemovePrograms/Generate_AddRemovePrograms.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ The filesystem path where the JSON manifests are stored.
88
#>
99
[CmdletBinding()]
1010
param (
11+
[Parameter(Mandatory = $true)]
12+
[string] $MountPath,
13+
1114
[Parameter(Mandatory = $true)]
1215
[string] $ManifestPath
1316
)

Functions/Private/Artifacts/AllWindowsFeatures/Generate_AllWindowsFeatures.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ The filesystem path where the JSON manifests are stored.
88
#>
99
[CmdletBinding()]
1010
param (
11+
[Parameter(Mandatory = $true)]
12+
[string] $MountPath,
13+
1114
[Parameter(Mandatory = $true)]
1215
[string] $ManifestPath
1316
)

Functions/Private/Artifacts/Apache/Generate_Apache.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ The filesystem path where the JSON manifests are stored.
88
#>
99
[CmdletBinding()]
1010
param (
11+
[Parameter(Mandatory = $true)]
12+
[string] $MountPath,
13+
1114
[Parameter(Mandatory = $true)]
1215
[string] $ManifestPath
1316
)

Functions/Private/Artifacts/DHCPServer/Generate_DHCPServer.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ The filesystem path where the JSON manifests are stored.
88
#>
99
[CmdletBinding()]
1010
param (
11+
[Parameter(Mandatory = $true)]
12+
[string] $MountPath,
13+
1114
[Parameter(Mandatory = $true)]
1215
[string] $ManifestPath
1316
)

Functions/Private/Artifacts/DNSServer/Generate_DNSServer.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ The filesystem path where the JSON manifests are stored.
88
#>
99
[CmdletBinding()]
1010
param (
11+
[Parameter(Mandatory = $true)]
12+
[string] $MountPath,
13+
1114
[Parameter(Mandatory = $true)]
1215
[string] $ManifestPath
1316
)

Functions/Private/Artifacts/MSMQ/Generate_MSMQ.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ The filesystem path where the JSON manifests are stored.
88
#>
99
[CmdletBinding()]
1010
param (
11+
[Parameter(Mandatory = $true)]
12+
[string] $MountPath,
13+
1114
[Parameter(Mandatory = $true)]
1215
[string] $ManifestPath
1316
)

Functions/Private/Artifacts/SQLServer/Generate_SQLServer.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ The filesystem path where the JSON manifests are stored.
88
#>
99
[CmdletBinding()]
1010
param (
11+
[Parameter(Mandatory = $true)]
12+
[string] $MountPath,
13+
1114
[Parameter(Mandatory = $true)]
1215
[string] $ManifestPath
1316
)

Functions/Public/ConvertTo/ConvertTo-Dockerfile.ps1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,16 @@
88
This command is the main entrypoint into this PowerShell module.
99
1010
.PARAMETER ImagePath
11-
The filesystem path to the valid WIM or VHDX file that will be inspected for artifacts.
11+
Use a Windows image file as the source for the artifacts. Specify the filesystem path to the valid WIM or VHDX file.
1212
1313
NOTE: You will need administrative permissions in order to mount and inspect image files.
1414
15+
.PARAMETER Local
16+
Use the local machine as the source for the artifacts.
17+
18+
.PARAMETER RemotePath
19+
Use a remote machine as the source for the artifacts. Specify the path to the system drive on the remote machine.
20+
1521
.PARAMETER OutputPath
1622
An optional parameter that specifies the filesystem path where artifacts and the resulting
1723
Dockerfile will be stored. If you do not specify a path, a temporary directory will be created for you within the $env:Temp location.
@@ -68,7 +74,7 @@
6874
6975
#>
7076

71-
77+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidGlobalVars",'')]
7278
[CmdletBinding()]
7379
param (
7480
[Parameter(Mandatory = $false)]

Functions/Public/ConvertTo/Tests/ConvertTo-Dockerfile.Tests.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
It 'Has a Parameter called ImagePath' {
66
$Function.Parameters.Keys.Contains('ImagePath') | Should Be 'True'
77
}
8-
It 'ImagePath Parameter is Identified as Mandatory being True' {
9-
[String]$Function.Parameters.ImagePath.Attributes.Mandatory | Should be 'True'
8+
It 'ImagePath Parameter is Identified as Mandatory being False' {
9+
[String]$Function.Parameters.ImagePath.Attributes.Mandatory | Should be 'False'
1010
}
1111
It 'ImagePath Parameter is of String Type' {
1212
$Function.Parameters.ImagePath.ParameterType.FullName | Should be 'System.String'
@@ -98,11 +98,11 @@
9898
It 'Has a Parameter called Artifact' {
9999
$Function.Parameters.Keys.Contains('Artifact') | Should Be 'True'
100100
}
101-
It 'Artifact Parameter is Identified as Mandatory being False' {
102-
[String]$Function.Parameters.Artifact.Attributes.Mandatory | Should be 'False'
101+
It 'Artifact Parameter is Identified as Mandatory being True' {
102+
[String]$Function.Parameters.Artifact.Attributes.Mandatory | Should be 'True'
103103
}
104104
It 'Artifact Parameter is of String[] Type' {
105-
$Function.Parameters.Artifact.ParameterType.FullName | Should be 'System.String[]'
105+
$Function.Parameters.Artifact.ParameterType.FullName | Should be 'System.String'
106106
}
107107
It 'Artifact Parameter is member of ParameterSets' {
108108
[String]$Function.Parameters.Artifact.ParameterSets.Keys | Should Be '__AllParameterSets'

Image2Docker.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'Image2Docker.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '1.7.4'
15+
ModuleVersion = '1.8.0'
1616

1717
# Supported PSEditions
1818
### NOTE: This module will not work with PowerShell Core.

0 commit comments

Comments
 (0)