metasploit_data_models 2.0.17 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.travis.yml +1 -1
- data/Gemfile +3 -8
- data/lib/mdm/host/operating_system_normalization.rb +2 -1
- data/lib/metasploit_data_models/engine.rb +7 -7
- data/lib/metasploit_data_models/version.rb +1 -1
- data/metasploit_data_models.gemspec +3 -1
- data/spec/app/models/mdm/client_spec.rb +3 -3
- data/spec/app/models/mdm/cred_spec.rb +34 -34
- data/spec/app/models/mdm/event_spec.rb +9 -9
- data/spec/app/models/mdm/exploit_attempt_spec.rb +5 -5
- data/spec/app/models/mdm/exploited_host_spec.rb +3 -3
- data/spec/app/models/mdm/host_detail_spec.rb +4 -4
- data/spec/app/models/mdm/host_spec.rb +47 -47
- data/spec/app/models/mdm/host_tag_spec.rb +5 -5
- data/spec/app/models/mdm/listener_spec.rb +12 -12
- data/spec/app/models/mdm/loot_spec.rb +8 -8
- data/spec/app/models/mdm/module/action_spec.rb +2 -2
- data/spec/app/models/mdm/module/arch_spec.rb +2 -2
- data/spec/app/models/mdm/module/author_spec.rb +3 -3
- data/spec/app/models/mdm/module/detail_spec.rb +71 -71
- data/spec/app/models/mdm/module/mixin_spec.rb +2 -2
- data/spec/app/models/mdm/module/platform_spec.rb +2 -2
- data/spec/app/models/mdm/module/ref_spec.rb +5 -5
- data/spec/app/models/mdm/module/target_spec.rb +2 -2
- data/spec/app/models/mdm/nexpose_console_spec.rb +15 -15
- data/spec/app/models/mdm/note_spec.rb +11 -11
- data/spec/app/models/mdm/ref_spec.rb +6 -6
- data/spec/app/models/mdm/route_spec.rb +3 -3
- data/spec/app/models/mdm/service_spec.rb +20 -20
- data/spec/app/models/mdm/session_event_spec.rb +3 -3
- data/spec/app/models/mdm/session_spec.rb +14 -14
- data/spec/app/models/mdm/tag_spec.rb +12 -12
- data/spec/app/models/mdm/task_cred_spec.rb +6 -6
- data/spec/app/models/mdm/task_host_spec.rb +6 -6
- data/spec/app/models/mdm/task_service_spec.rb +6 -6
- data/spec/app/models/mdm/task_session_spec.rb +6 -6
- data/spec/app/models/mdm/task_spec.rb +3 -3
- data/spec/app/models/mdm/user_spec.rb +3 -3
- data/spec/app/models/mdm/vuln_attempt_spec.rb +4 -4
- data/spec/app/models/mdm/vuln_detail_spec.rb +3 -3
- data/spec/app/models/mdm/vuln_ref_spec.rb +4 -4
- data/spec/app/models/mdm/vuln_spec.rb +20 -20
- data/spec/app/models/mdm/web_form_spec.rb +3 -3
- data/spec/app/models/mdm/web_page_spec.rb +4 -4
- data/spec/app/models/mdm/web_site_spec.rb +15 -15
- data/spec/app/models/mdm/web_vuln_spec.rb +4 -4
- data/spec/app/models/mdm/workspace_spec.rb +25 -25
- data/spec/app/models/metasploit_data_models/automatic_exploitation/match_result_spec.rb +4 -4
- data/spec/app/models/metasploit_data_models/automatic_exploitation/match_set_spec.rb +2 -2
- data/spec/app/models/metasploit_data_models/automatic_exploitation/match_spec.rb +3 -3
- data/spec/app/models/metasploit_data_models/automatic_exploitation/run_spec.rb +5 -5
- data/spec/app/models/metasploit_data_models/module_run_spec.rb +3 -3
- data/spec/app/models/metasploit_data_models/search/visitor/includes_spec.rb +4 -8
- data/spec/app/models/metasploit_data_models/search/visitor/joins_spec.rb +12 -12
- data/spec/app/models/metasploit_data_models/search/visitor/relation_spec.rb +16 -16
- data/spec/app/models/metasploit_data_models/search/visitor/where_spec.rb +3 -3
- data/spec/dummy/config/environments/test.rb +1 -1
- data/spec/dummy/db/structure.sql +2 -2
- data/spec/factories/mdm/addresses.rb +2 -2
- data/spec/factories/mdm/clients.rb +2 -2
- data/spec/factories/mdm/creds.rb +2 -2
- data/spec/factories/mdm/events.rb +3 -3
- data/spec/factories/mdm/exploit_attempts.rb +2 -2
- data/spec/factories/mdm/exploited_hosts.rb +1 -1
- data/spec/factories/mdm/fingerprints/nessus_fingerprints.rb +2 -2
- data/spec/factories/mdm/fingerprints/nexpose_fingerprints.rb +2 -2
- data/spec/factories/mdm/fingerprints/nmap_fingerprints.rb +2 -2
- data/spec/factories/mdm/fingerprints/retina_fingerprints.rb +2 -2
- data/spec/factories/mdm/fingerprints/session_fingerprints.rb +2 -2
- data/spec/factories/mdm/host_details.rb +2 -2
- data/spec/factories/mdm/host_tags.rb +2 -2
- data/spec/factories/mdm/hosts.rb +2 -2
- data/spec/factories/mdm/listeners.rb +2 -2
- data/spec/factories/mdm/loots.rb +2 -2
- data/spec/factories/mdm/module/actions.rb +2 -2
- data/spec/factories/mdm/module/archs.rb +2 -2
- data/spec/factories/mdm/module/authors.rb +2 -2
- data/spec/factories/mdm/module/details.rb +1 -1
- data/spec/factories/mdm/module/mixins.rb +2 -2
- data/spec/factories/mdm/module/platforms.rb +2 -2
- data/spec/factories/mdm/module/refs.rb +2 -2
- data/spec/factories/mdm/module/targets.rb +2 -2
- data/spec/factories/mdm/nexpose_consoles.rb +2 -2
- data/spec/factories/mdm/notes.rb +2 -2
- data/spec/factories/mdm/refs.rb +2 -2
- data/spec/factories/mdm/routes.rb +2 -2
- data/spec/factories/mdm/services.rb +3 -3
- data/spec/factories/mdm/session_events.rb +1 -1
- data/spec/factories/mdm/sessions.rb +2 -2
- data/spec/factories/mdm/tags.rb +2 -2
- data/spec/factories/mdm/task.rb +2 -2
- data/spec/factories/mdm/task_creds.rb +2 -2
- data/spec/factories/mdm/task_hosts.rb +2 -2
- data/spec/factories/mdm/task_services.rb +2 -2
- data/spec/factories/mdm/task_sessions.rb +2 -2
- data/spec/factories/mdm/users.rb +2 -2
- data/spec/factories/mdm/vuln_attempts.rb +2 -2
- data/spec/factories/mdm/vuln_details.rb +2 -2
- data/spec/factories/mdm/vuln_refs.rb +2 -2
- data/spec/factories/mdm/vulns.rb +2 -2
- data/spec/factories/mdm/web_forms.rb +1 -1
- data/spec/factories/mdm/web_pages.rb +2 -2
- data/spec/factories/mdm/web_sites.rb +2 -2
- data/spec/factories/mdm/web_vulns.rb +2 -2
- data/spec/factories/mdm/workspaces.rb +2 -2
- data/spec/factories/metasploit_data_models/automatic_exploitation/match_results.rb +1 -1
- data/spec/factories/metasploit_data_models/automatic_exploitation/match_sets.rb +2 -2
- data/spec/factories/metasploit_data_models/automatic_exploitation/matches.rb +1 -1
- data/spec/factories/metasploit_data_models/automatic_exploitation/runs.rb +1 -1
- data/spec/factories/module_runs.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- data.tar.gz.sig +0 -0
- metadata +7 -7
- metadata.gz.sig +0 -0
@@ -82,9 +82,9 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Joins, type: :model do
|
|
82
82
|
it { is_expected.to eq([]) }
|
83
83
|
end
|
84
84
|
|
85
|
-
context 'with association and attribute' do
|
85
|
+
context 'with association and attribute', pending: 'FactoryBot update' do
|
86
86
|
let(:association) do
|
87
|
-
|
87
|
+
FactoryBot.generate :metasploit_model_search_operator_association_association
|
88
88
|
end
|
89
89
|
|
90
90
|
let(:association_operation) {
|
@@ -118,9 +118,9 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Joins, type: :model do
|
|
118
118
|
it { is_expected.to eq([]) }
|
119
119
|
end
|
120
120
|
|
121
|
-
context 'with the same child join for all' do
|
121
|
+
context 'with the same child join for all', pending: "FactoryBot update" do
|
122
122
|
let(:association) do
|
123
|
-
|
123
|
+
FactoryBot.generate :metasploit_model_search_operator_association_association
|
124
124
|
end
|
125
125
|
|
126
126
|
let(:association_operation) {
|
@@ -147,10 +147,10 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Joins, type: :model do
|
|
147
147
|
end
|
148
148
|
end
|
149
149
|
|
150
|
-
context 'with union of intersections' do
|
150
|
+
context 'with union of intersections', pending: "FactoryBot update" do
|
151
151
|
let(:disjoint_associations) do
|
152
152
|
Array.new(2) {
|
153
|
-
|
153
|
+
FactoryBot.generate :metasploit_model_search_operator_association_association
|
154
154
|
}
|
155
155
|
end
|
156
156
|
|
@@ -207,7 +207,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Joins, type: :model do
|
|
207
207
|
context 'with a common subset of child join' do
|
208
208
|
let(:common_associations) do
|
209
209
|
Array.new(2) {
|
210
|
-
|
210
|
+
FactoryBot.generate :metasploit_model_search_operator_association_association
|
211
211
|
}
|
212
212
|
end
|
213
213
|
|
@@ -316,9 +316,9 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Joins, type: :model do
|
|
316
316
|
end
|
317
317
|
end
|
318
318
|
|
319
|
-
context 'with Metasploit::Model::Search::Operator::Association' do
|
319
|
+
context 'with Metasploit::Model::Search::Operator::Association', pending: "FactoryBot update" do
|
320
320
|
let(:association) do
|
321
|
-
|
321
|
+
FactoryBot.generate :metasploit_model_search_operator_association_association
|
322
322
|
end
|
323
323
|
|
324
324
|
let(:node) do
|
@@ -368,7 +368,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Joins, type: :model do
|
|
368
368
|
|
369
369
|
context 'with name' do
|
370
370
|
let(:name) do
|
371
|
-
|
371
|
+
FactoryBot.generate :mdm_host_name
|
372
372
|
end
|
373
373
|
|
374
374
|
let(:formatted) do
|
@@ -380,7 +380,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Joins, type: :model do
|
|
380
380
|
|
381
381
|
context 'with services.name' do
|
382
382
|
let(:name) do
|
383
|
-
|
383
|
+
FactoryBot.generate :mdm_service_name
|
384
384
|
end
|
385
385
|
|
386
386
|
let(:formatted) do
|
@@ -393,4 +393,4 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Joins, type: :model do
|
|
393
393
|
end
|
394
394
|
end
|
395
395
|
end
|
396
|
-
end
|
396
|
+
end
|
@@ -22,7 +22,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
let(:value) {
|
25
|
-
|
25
|
+
FactoryBot.generate :mdm_host_name
|
26
26
|
}
|
27
27
|
|
28
28
|
it_should_behave_like 'Metasploit::Concern.run'
|
@@ -171,7 +171,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
|
|
171
171
|
#
|
172
172
|
|
173
173
|
let(:non_matching_host) {
|
174
|
-
|
174
|
+
FactoryBot.create(
|
175
175
|
:mdm_host,
|
176
176
|
address: non_matching_host_address,
|
177
177
|
name: non_matching_host_name,
|
@@ -179,7 +179,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
|
|
179
179
|
os_name: non_matching_host_os_name,
|
180
180
|
os_sp: non_matching_host_os_sp
|
181
181
|
).tap { |host|
|
182
|
-
|
182
|
+
FactoryBot.create(
|
183
183
|
:mdm_host_tag,
|
184
184
|
host: host,
|
185
185
|
tag: non_matching_tag
|
@@ -224,7 +224,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
|
|
224
224
|
}
|
225
225
|
|
226
226
|
let(:non_matching_tag) {
|
227
|
-
|
227
|
+
FactoryBot.create(
|
228
228
|
:mdm_tag,
|
229
229
|
desc: non_matching_tag_desc,
|
230
230
|
name: non_matching_tag_name
|
@@ -244,7 +244,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
|
|
244
244
|
#
|
245
245
|
|
246
246
|
let!(:non_matching_record) {
|
247
|
-
|
247
|
+
FactoryBot.create(
|
248
248
|
:mdm_service,
|
249
249
|
host: non_matching_host,
|
250
250
|
info: non_matching_info,
|
@@ -276,7 +276,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
|
|
276
276
|
|
277
277
|
let!(:matching_record_by_port) {
|
278
278
|
matching_ports.each_with_object({}) { |matching_port, matching_record_by_port|
|
279
|
-
matching_record_by_port[matching_port] =
|
279
|
+
matching_record_by_port[matching_port] = FactoryBot.create(
|
280
280
|
:mdm_service,
|
281
281
|
port: matching_port
|
282
282
|
)
|
@@ -346,7 +346,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
|
|
346
346
|
#
|
347
347
|
|
348
348
|
let(:matching_host) {
|
349
|
-
|
349
|
+
FactoryBot.create(
|
350
350
|
:mdm_host,
|
351
351
|
address: matching_host_address,
|
352
352
|
name: matching_host_name,
|
@@ -354,7 +354,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
|
|
354
354
|
os_name: matching_host_os_name,
|
355
355
|
os_sp: matching_host_os_sp
|
356
356
|
).tap { |host|
|
357
|
-
|
357
|
+
FactoryBot.create(
|
358
358
|
:mdm_host_tag,
|
359
359
|
host: host,
|
360
360
|
tag: matching_tag
|
@@ -399,7 +399,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
|
|
399
399
|
}
|
400
400
|
|
401
401
|
let(:matching_tag) {
|
402
|
-
|
402
|
+
FactoryBot.create(
|
403
403
|
:mdm_tag,
|
404
404
|
desc: matching_tag_desc,
|
405
405
|
name: matching_tag_name
|
@@ -419,7 +419,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
|
|
419
419
|
#
|
420
420
|
|
421
421
|
let!(:matching_record) {
|
422
|
-
|
422
|
+
FactoryBot.create(
|
423
423
|
:mdm_service,
|
424
424
|
host: matching_host,
|
425
425
|
info: matching_info,
|
@@ -636,7 +636,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
|
|
636
636
|
#
|
637
637
|
|
638
638
|
let!(:matching_record) do
|
639
|
-
|
639
|
+
FactoryBot.build(
|
640
640
|
:mdm_host,
|
641
641
|
address: matching_record_address,
|
642
642
|
name: matching_record_name,
|
@@ -647,7 +647,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
|
|
647
647
|
end
|
648
648
|
|
649
649
|
let!(:matching_service) do
|
650
|
-
|
650
|
+
FactoryBot.create(
|
651
651
|
:mdm_service,
|
652
652
|
host: matching_record,
|
653
653
|
name: matching_service_name
|
@@ -655,7 +655,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
|
|
655
655
|
end
|
656
656
|
|
657
657
|
let!(:non_matching_record) do
|
658
|
-
|
658
|
+
FactoryBot.build(
|
659
659
|
:mdm_host,
|
660
660
|
address: non_matching_record_address,
|
661
661
|
name: non_matching_record_name,
|
@@ -666,7 +666,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
|
|
666
666
|
end
|
667
667
|
|
668
668
|
let!(:non_matching_service) do
|
669
|
-
|
669
|
+
FactoryBot.create(
|
670
670
|
:mdm_service,
|
671
671
|
host: non_matching_record,
|
672
672
|
name: non_matching_service_name
|
@@ -828,7 +828,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
|
|
828
828
|
#
|
829
829
|
|
830
830
|
let!(:matching_record) {
|
831
|
-
|
831
|
+
FactoryBot.create(
|
832
832
|
:mdm_tag,
|
833
833
|
desc: matching_desc,
|
834
834
|
name: matching_name
|
@@ -836,7 +836,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
|
|
836
836
|
}
|
837
837
|
|
838
838
|
let!(:non_matching_record) {
|
839
|
-
|
839
|
+
FactoryBot.create(
|
840
840
|
:mdm_tag,
|
841
841
|
desc: non_matching_desc,
|
842
842
|
name: non_matching_name
|
@@ -155,7 +155,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Where, type: :model do
|
|
155
155
|
|
156
156
|
context 'with name' do
|
157
157
|
let(:name) do
|
158
|
-
|
158
|
+
FactoryBot.generate :mdm_host_name
|
159
159
|
end
|
160
160
|
|
161
161
|
let(:formatted) do
|
@@ -169,7 +169,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Where, type: :model do
|
|
169
169
|
|
170
170
|
context 'with services.name' do
|
171
171
|
let(:name) do
|
172
|
-
|
172
|
+
FactoryBot.generate :mdm_service_name
|
173
173
|
end
|
174
174
|
|
175
175
|
let(:formatted) do
|
@@ -184,4 +184,4 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Where, type: :model do
|
|
184
184
|
end
|
185
185
|
end
|
186
186
|
end
|
187
|
-
end
|
187
|
+
end
|
@@ -13,7 +13,7 @@ Rails.application.configure do
|
|
13
13
|
config.eager_load = false
|
14
14
|
|
15
15
|
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
-
config.
|
16
|
+
config.serve_static_files = true
|
17
17
|
config.static_cache_control = 'public, max-age=3600'
|
18
18
|
|
19
19
|
# Show full error reports and disable caching.
|
data/spec/dummy/db/structure.sql
CHANGED
data/spec/factories/mdm/creds.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :mdm_event, :aliases => [:event], :class => Mdm::Event do
|
3
|
-
name {
|
3
|
+
name { FactoryBot.generate :mdm_event_name }
|
4
4
|
|
5
5
|
trait :workspace do
|
6
6
|
association :workspace, :factory => :mdm_workspace
|
@@ -12,4 +12,4 @@ FactoryGirl.define do
|
|
12
12
|
sequence :mdm_event_name do |n|
|
13
13
|
"Event #{n}"
|
14
14
|
end
|
15
|
-
end
|
15
|
+
end
|
data/spec/factories/mdm/hosts.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :mdm_host, :class => Mdm::Host do
|
3
3
|
#
|
4
4
|
# Associations
|
@@ -82,4 +82,4 @@ FactoryGirl.define do
|
|
82
82
|
|
83
83
|
virtual_hosts = ['VMWare', 'QEMU', 'XEN']
|
84
84
|
sequence :mdm_host_virtual_host, virtual_hosts.cycle
|
85
|
-
end
|
85
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :mdm_listener, :aliases => [:listener], :class => Mdm::Listener do
|
3
3
|
#
|
4
4
|
# Associations
|
@@ -9,4 +9,4 @@ FactoryGirl.define do
|
|
9
9
|
address { generate :mdm_ipv4_address }
|
10
10
|
port { generate :mdm_tcp_port }
|
11
11
|
end
|
12
|
-
end
|
12
|
+
end
|
data/spec/factories/mdm/loots.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :mdm_module_action, :class => Mdm::Module::Action do
|
3
3
|
name { generate :mdm_module_action_name }
|
4
4
|
|
@@ -11,4 +11,4 @@ FactoryGirl.define do
|
|
11
11
|
sequence :mdm_module_action_name do |n|
|
12
12
|
"Mdm::Module::Action#name #{n}"
|
13
13
|
end
|
14
|
-
end
|
14
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :mdm_module_arch, :class => Mdm::Module::Arch do
|
3
3
|
name { generate :mdm_module_arch_name }
|
4
4
|
|
@@ -11,4 +11,4 @@ FactoryGirl.define do
|
|
11
11
|
sequence :mdm_module_arch_name do |n|
|
12
12
|
"Mdm::Module::Arch#name #{n}"
|
13
13
|
end
|
14
|
-
end
|
14
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :mdm_module_author, :class => Mdm::Module::Author do
|
3
3
|
name { generate :mdm_module_author_name }
|
4
4
|
|
@@ -19,4 +19,4 @@ FactoryGirl.define do
|
|
19
19
|
sequence :mdm_module_author_email do |n|
|
20
20
|
"Mdm::Module::Author#email #{n}"
|
21
21
|
end
|
22
|
-
end
|
22
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :mdm_module_mixin, :class => Mdm::Module::Mixin do
|
3
3
|
name { generate :mdm_module_mixin_name }
|
4
4
|
|
@@ -11,4 +11,4 @@ FactoryGirl.define do
|
|
11
11
|
sequence :mdm_module_mixin_name do |n|
|
12
12
|
"Mdm::Module::Mixin#name #{n}"
|
13
13
|
end
|
14
|
-
end
|
14
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :mdm_module_platform, :class => Mdm::Module::Platform do
|
3
3
|
name { generate :mdm_module_platform_name }
|
4
4
|
|
@@ -11,4 +11,4 @@ FactoryGirl.define do
|
|
11
11
|
sequence :mdm_module_platform_name do |n|
|
12
12
|
"Mdm::Module::Platform#name #{n}"
|
13
13
|
end
|
14
|
-
end
|
14
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :mdm_module_ref, :class => Mdm::Module::Ref do
|
3
3
|
name { generate :mdm_module_ref_name }
|
4
4
|
|
@@ -11,4 +11,4 @@ FactoryGirl.define do
|
|
11
11
|
sequence :mdm_module_ref_name do |n|
|
12
12
|
"Mdm::Module::Ref#name #{n}"
|
13
13
|
end
|
14
|
-
end
|
14
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :mdm_module_target, :class => Mdm::Module::Target do
|
3
3
|
index { generate :mdm_module_target_index }
|
4
4
|
name { generate :mdm_module_target_name }
|
@@ -16,4 +16,4 @@ FactoryGirl.define do
|
|
16
16
|
sequence :mdm_module_target_name do |n|
|
17
17
|
"Mdm::Module::Target#name #{n}"
|
18
18
|
end
|
19
|
-
end
|
19
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :mdm_nexpose_console, :aliases => [:nexpose_console], :class => Mdm::NexposeConsole do
|
3
3
|
name { generate :mdm_nexpose_console_name }
|
4
4
|
port { generate :mdm_tcp_port }
|
@@ -12,4 +12,4 @@ FactoryGirl.define do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
|
15
|
-
end
|
15
|
+
end
|
data/spec/factories/mdm/notes.rb
CHANGED
data/spec/factories/mdm/refs.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :mdm_service, :class => Mdm::Service do
|
3
3
|
#
|
4
4
|
# Associations
|
@@ -15,7 +15,7 @@ FactoryGirl.define do
|
|
15
15
|
|
16
16
|
factory :web_service do
|
17
17
|
proto 'tcp'
|
18
|
-
name {
|
18
|
+
name { FactoryBot.generate(:web_service_name) }
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -38,4 +38,4 @@ FactoryGirl.define do
|
|
38
38
|
sequence :web_service_name do |n|
|
39
39
|
web_service_names[n % web_service_name_count]
|
40
40
|
end
|
41
|
-
end
|
41
|
+
end
|
data/spec/factories/mdm/tags.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :mdm_tag, :class => Mdm::Tag do
|
3
3
|
desc { generate :mdm_tag_desc }
|
4
4
|
name { generate :mdm_tag_name }
|
@@ -11,4 +11,4 @@ FactoryGirl.define do
|
|
11
11
|
sequence :mdm_tag_name do |n|
|
12
12
|
"mdm_tag_name#{n}"
|
13
13
|
end
|
14
|
-
end
|
14
|
+
end
|