Skip to content

Commit

Permalink
Fixing the specs to reflect that the Attach certificate is now using …
Browse files Browse the repository at this point in the history
…the powershell provider as well as using erb templates
  • Loading branch information
stack72 committed Apr 22, 2014
1 parent da0a08c commit c81ffd4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Modulefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name 'opentable/iis'
version '1.0.0'
version '1.1.0'
author 'opentable'
license 'MIT'
summary 'Module that will manage IIS for windows server 2008 and above. It will help maintain application pools, sites and virtual applications'
Expand Down
7 changes: 4 additions & 3 deletions spec/defines/manage_binding_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,10 @@
} }

it { should contain_exec('Attach-Certificate-myWebSite-port-443').with({
'command' => "#{powershell} -Command \"Import-Module WebAdministration; New-Item \\\"IIS:\\SslBindings\\127.0.0.1!443\\\" -Value (Get-ChildItem cert:\\ -Recurse | Where-Object {\$_.Thumbprint.Equals(\\\"myCertificate\\\")} | Select-Object -First 1)\"",
'onlyif' => "#{powershell} -Command \"Import-Module WebAdministration; if((Get-ChildItem cert:\\ -Recurse | Where-Object {\$_.Thumbprint.Equals(\\\"myCertificate\\\")} | Select-Object -First 1) -and ((Test-Path \\\"IIS:\\SslBindings\\127.0.0.1!443\\\") -eq \$false)) { exit 0 } else { exit 1 }\"",
})}
'command' => "C:\\temp\\create-myWebSite-port-443.ps1",
'onlyif' => "C:\\temp\\inspect-myWebSite-port-443.ps1",
'provider' => "powershell"
})}
end

describe 'when managing an iis site binding and setting ensure to present' do
Expand Down

0 comments on commit c81ffd4

Please sign in to comment.