File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
support/shared/examples/msf/module_manager Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 287
287
288
288
its ( :host ) { should == Mdm ::Host . last }
289
289
its ( :refs ) { should == [ ] }
290
- its ( :exploited_at ) { should == Time . now . utc }
290
+ its ( :exploited_at ) { should be_within ( 1 . second ) . of ( Time . now . utc ) }
291
291
292
292
context "with session.via_exploit 'exploit/multi/handler'" do
293
293
context "with session.exploit_datastore['ParentModule']" do
374
374
Mdm ::ExploitAttempt . last
375
375
end
376
376
377
- its ( :attempted_at ) { should == Time . now . utc }
377
+ its ( :attempted_at ) { should be_within ( 1 . second ) . of ( Time . now . utc ) }
378
378
# @todo https://www.pivotaltracker.com/story/show/48362615
379
379
its ( :session_id ) { should == Mdm ::Session . last . id }
380
380
its ( :exploited ) { should == true }
442
442
its ( :datastore ) { should == session . exploit_datastore . to_h }
443
443
its ( :desc ) { should == session . info }
444
444
its ( :host_id ) { should == Mdm ::Host . last . id }
445
- its ( :last_seen ) { should == Time . now . utc }
445
+ its ( :last_seen ) { should be_within ( 1 . second ) . of ( Time . now . utc ) }
446
446
its ( :local_id ) { should == session . sid }
447
- its ( :opened_at ) { should == Time . now . utc }
447
+ its ( :opened_at ) { should be_within ( 1 . second ) . of ( Time . now . utc ) }
448
448
its ( :platform ) { should == session . platform }
449
449
its ( :routes ) { should == [ ] }
450
450
its ( :stype ) { should == session . type }
Original file line number Diff line number Diff line change @@ -303,6 +303,10 @@ def module_info_by_path_from_database!
303
303
)
304
304
end
305
305
306
+ let ( :pathname_modification_time ) do
307
+ pathname . mtime
308
+ end
309
+
306
310
let ( :type ) do
307
311
'exploit'
308
312
end
@@ -345,7 +349,7 @@ def module_info_by_path_from_database!
345
349
module_info_by_path_from_database!
346
350
end
347
351
348
- its ( [ :modification_time ] ) { should == pathname . mtime }
352
+ its ( [ :modification_time ] ) { should be_within ( 1 . second ) . of ( pathname_modification_time ) }
349
353
its ( [ :parent_path ] ) { should == parent_path }
350
354
its ( [ :reference_name ] ) { should == reference_name }
351
355
its ( [ :type ] ) { should == type }
You can’t perform that action at this time.
0 commit comments