CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/spec/lib/msf/db_manager_spec.rb
Views: 11655
1
#
2
# Specs
3
#
4
5
require 'spec_helper'
6
7
#
8
# Project
9
#
10
11
require 'metasploit/framework/database'
12
13
RSpec.describe Msf::DBManager do
14
include_context 'Msf::DBManager'
15
16
subject do
17
db_manager
18
end
19
20
it_should_behave_like 'Msf::DBManager::Adapter'
21
it_should_behave_like 'Msf::DBManager::Client'
22
it_should_behave_like 'Msf::DBManager::Connection'
23
it_should_behave_like 'Msf::DBManager::Cred'
24
it_should_behave_like 'Msf::DBManager::Event'
25
it_should_behave_like 'Msf::DBManager::ExploitAttempt'
26
it_should_behave_like 'Msf::DBManager::ExploitedHost'
27
it_should_behave_like 'Msf::DBManager::Host'
28
it_should_behave_like 'Msf::DBManager::HostDetail'
29
it_should_behave_like 'Msf::DBManager::HostTag'
30
it_should_behave_like 'Msf::DBManager::IPAddress'
31
it_should_behave_like 'Msf::DBManager::Import'
32
it_should_behave_like 'Msf::DBManager::Loot'
33
it_should_behave_like 'Msf::DBManager::Migration'
34
it_should_behave_like 'Msf::DBManager::ModuleCache'
35
it_should_behave_like 'Msf::DBManager::Note'
36
it_should_behave_like 'Msf::DBManager::Ref'
37
it_should_behave_like 'Msf::DBManager::Report'
38
it_should_behave_like 'Msf::DBManager::Route'
39
it_should_behave_like 'Msf::DBManager::Service'
40
it_should_behave_like 'Msf::DBManager::Session'
41
it_should_behave_like 'Msf::DBManager::SessionEvent'
42
it_should_behave_like 'Msf::DBManager::Task'
43
it_should_behave_like 'Msf::DBManager::Vuln'
44
it_should_behave_like 'Msf::DBManager::VulnAttempt'
45
it_should_behave_like 'Msf::DBManager::VulnDetail'
46
it_should_behave_like 'Msf::DBManager::WMAP'
47
it_should_behave_like 'Msf::DBManager::Web'
48
it_should_behave_like 'Msf::DBManager::Workspace'
49
50
# Not implemented in remote data service
51
unless ENV['REMOTE_DB']
52
it { is_expected.to respond_to :check }
53
it { is_expected.to respond_to :error }
54
it { is_expected.to respond_to :service_name_map }
55
end
56
57
end
58
59