-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #389 from raniemi/windows-hotfixes
Basic Windows Hot Fix Support
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Serverspec | ||
module Type | ||
class WindowsHotFix < Base | ||
def installed?(provider, version) | ||
backend.check_windows_hot_fix_installed(@name, version) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require 'spec_helper' | ||
|
||
include SpecInfra::Helper::Cmd | ||
include SpecInfra::Helper::Windows | ||
|
||
describe windows_hot_fix('DESCRIPTION-OR-KB-ID') do | ||
it { should be_installed } | ||
its(:command) { should == "(FindInstalledHotFix -description 'DESCRIPTION-OR-KB-ID' -hotFixId 'DESCRIPTION-OR-KB-ID') -eq $true" } | ||
end | ||
|
||
describe windows_hot_fix('DESCRIPTION') do | ||
it { should be_installed.with_version('KB-ID') } | ||
its(:command) { should == "(FindInstalledHotFix -description 'DESCRIPTION' -hotFixId 'KB-ID') -eq $true" } | ||
end | ||
|
||
describe windows_hot_fix('DESCRIPTION_WITH_KB123456789_INLINED') do | ||
it { should be_installed } | ||
its(:command) { should == "(FindInstalledHotFix -description 'DESCRIPTION_WITH_KB123456789_INLINED' -hotFixId 'KB123456789') -eq $true" } | ||
end | ||
|
||
describe windows_hot_fix('DESCRIPTION_WITH_SUFFIX_KB123456789') do | ||
it { should be_installed } | ||
its(:command) { should == "(FindInstalledHotFix -description 'DESCRIPTION_WITH_SUFFIX_KB123456789' -hotFixId 'KB123456789') -eq $true" } | ||
end | ||
|