|
73 | 73 | describe "-p" do
|
74 | 74 | before(:each) do
|
75 | 75 | host = FactoryGirl.create(:mdm_host, :workspace => framework.db.workspace, :address => "192.168.0.1")
|
76 |
| - FactoryGirl.create(:mdm_service, :host => host, :port => 1024, name: 'Service1') |
77 |
| - FactoryGirl.create(:mdm_service, :host => host, :port => 1025, name: 'Service2') |
78 |
| - FactoryGirl.create(:mdm_service, :host => host, :port => 1026, name: 'Service3') |
| 76 | + FactoryGirl.create(:mdm_service, :host => host, :port => 1024, name: 'Service1', proto: 'udp') |
| 77 | + FactoryGirl.create(:mdm_service, :host => host, :port => 1025, name: 'Service2', proto: 'tcp') |
| 78 | + FactoryGirl.create(:mdm_service, :host => host, :port => 1026, name: 'Service3', proto: 'udp') |
79 | 79 | end
|
80 | 80 | it "should list services that are on a given port" do
|
81 | 81 | db.cmd_services "-p", "1024,1025"
|
|
85 | 85 | "",
|
86 | 86 | "host port proto name state info",
|
87 | 87 | "---- ---- ----- ---- ----- ----",
|
88 |
| - "192.168.0.1 1024 snmp Service1 open ", |
89 |
| - "192.168.0.1 1025 snmp Service2 open " |
| 88 | + "192.168.0.1 1024 udp Service1 open ", |
| 89 | + "192.168.0.1 1025 tcp Service2 open " |
90 | 90 | ]
|
91 | 91 | end
|
92 | 92 | end
|
|
0 commit comments