1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-05 14:57:30 +01:00

Add some negative tests

This commit is contained in:
Meatballs 2013-12-17 15:24:27 +00:00
parent 41a00101b0
commit 73d978d5f6
No known key found for this signature in database
GPG Key ID: 5380EAF01F2F8B38

View File

@ -206,6 +206,32 @@ class Metasploit3 < Msf::Post
end
end
def test_noaccess
it "should raise a runtime exception if no access to service" do
ret = false
begin
results = service_stop("gpsvc")
rescue RuntimeError
ret = true
end
ret
end
end
def test_no_service
it "should raise a runtime exception if services doesnt exist" do
ret = false
begin
results = service_status(Rex::Text.rand_text_alpha(5))
rescue RuntimeError
ret = true
end
ret
end
end
=begin
def run
blab = datastore['VERBOSE']