CFINSPEC-291: Add windows test for process without path

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
This commit is contained in:
Sonu Saha 2022-06-08 18:28:02 +05:30
parent 4d538f57c2
commit 8ffca97e27
2 changed files with 6 additions and 0 deletions

View file

@ -1,3 +1,4 @@
PriorityClass,Id,CPU,PM,VirtualMemorySize,NPM,SessionId,Responding,StartTime,TotalProcessorTime,UserName,Path,ProcessName
Normal,2456,0.296875,4808704,118202368,14576,1,True,5/31/2017 9:13:17 AM,00:00:00.2968750,WINVAGR-QQQNHPN\Administrator,C:\Windows\system32\mmc.exe,,
High,396,0.15625,1323008,53710848,7776,1,True,5/31/2017 9:12:56 AM,00:00:00.1562500,NT AUTHORITY\SYSTEM,C:\Windows\system32\winlogon.exe,winlogon
,1360,3505.90625,270106624,644595712,88624,0,True,5/11/2022 5:17:04 PM,00:58:25.9062500,,,MsMpEng

View file

@ -222,6 +222,11 @@ describe "Inspec::Resources::Processes" do
_(resource.exists?).must_equal true
end
it "process without path should exist" do
resource = MockLoader.new(:windows).load_resource("processes", "MsMpEng")
_(resource.exists?).must_equal true
end
it "process should_not exist" do
resource = MockLoader.new(:windows).load_resource("processes", "unicorn.exe")
_(resource.exists?).must_equal false