wip
This commit is contained in:
parent
c3ac2d2fc9
commit
eb791af722
@ -4,7 +4,7 @@ BeforeAll {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Describe "New-CSCertAttribute" {
|
Describe "New-CSCertAttribute" {
|
||||||
Context "Basis Tests" {
|
Context "Basis Tests" -Tag 'Unit' {
|
||||||
It "Should not throw" {
|
It "Should not throw" {
|
||||||
$AttribParams = @{
|
$AttribParams = @{
|
||||||
Country = 'DE'
|
Country = 'DE'
|
||||||
|
25
src/Certificate/New-CSCertificate.Tests.ps1
Normal file
25
src/Certificate/New-CSCertificate.Tests.ps1
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
BeforeAll {
|
||||||
|
$ManifestFile = (Get-Item -Path "./src/*.psd1").FullName
|
||||||
|
Import-Module $ManifestFile -Force
|
||||||
|
}
|
||||||
|
|
||||||
|
Describe "New-CSCertificate" {
|
||||||
|
Context "Basic Tests" -Tag 'Unit' {
|
||||||
|
It "Should not throw" {
|
||||||
|
$attribs = @{
|
||||||
|
Country = 'DE'
|
||||||
|
State = 'BW'
|
||||||
|
City = 'KA'
|
||||||
|
Organization = 'IT'
|
||||||
|
OrganizationalUnitName = 'foo'
|
||||||
|
CommonName = 'MyCert'
|
||||||
|
}
|
||||||
|
$CertAttribs = @{
|
||||||
|
CRTAttribute = $attribs
|
||||||
|
KeyName = Join-Path -Path (Get-TempDir) -ChildPath '/foo.key'
|
||||||
|
CertName = Join-Path -Path (Get-TempDir) -ChildPath '/cert.pfx'
|
||||||
|
}
|
||||||
|
{ New-CSCertificate @CertAttribs } | Should -Not -Throw
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,15 +0,0 @@
|
|||||||
Describe "New-CSCertificate" {
|
|
||||||
Context "Basic Tests" {
|
|
||||||
It "Test1: Should not throw" {
|
|
||||||
|
|
||||||
$attribs = New-CSCertAttribute -Country 'DE' -State 'BW' -City 'KA' -Organization 'IT' -OrganizationalUnitName'' -CommonName 'Mycert'
|
|
||||||
|
|
||||||
$CertAttribs = @{
|
|
||||||
CRTAttribute = $attribs
|
|
||||||
KeyName = Join-Path -Path (Get-TempDir) -ChildPath '/foo.key'
|
|
||||||
CertName = Join-Path -Path (Get-TempDir) -ChildPath '/cert.pfx'
|
|
||||||
}
|
|
||||||
{ New-CSCertificate @CertAttribs } | Should -Not -Throw
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user