diff --git a/Gemfile b/Gemfile index cdf3e12..11511ff 100644 --- a/Gemfile +++ b/Gemfile @@ -41,7 +41,7 @@ gem 'classy_enum' gem 'thin' -gem 'sippy_cup', '~> 0.6.0' +gem 'sippy_cup', '~> 0.7.0' gem 'net-ssh' gem 'rails_12factor' diff --git a/Gemfile.lock b/Gemfile.lock index 5ee894c..19c2430 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -267,8 +267,8 @@ GEM rack (~> 1.4) rack-protection (~> 1.4) tilt (~> 1.3, >= 1.3.4) - sippy_cup (0.6.0) - activesupport (~> 3.0) + sippy_cup (0.7.0) + activesupport (>= 3.0) nokogiri (~> 1.6.0) packetfu psych (~> 2.0.1) @@ -355,7 +355,7 @@ DEPENDENCIES sidekiq simple_form sinatra (>= 1.3.0) - sippy_cup (~> 0.6.0) + sippy_cup (~> 0.7.0) slim (>= 1.1.0) state_machine test-unit diff --git a/app/models/test_run.rb b/app/models/test_run.rb index fe1352e..b4cc157 100644 --- a/app/models/test_run.rb +++ b/app/models/test_run.rb @@ -5,7 +5,7 @@ class TestRun < ActiveRecord::Base attr_accessible :target, :target_id attr_accessible :receiver_scenario, :receiver_scenario_id attr_accessible :registration_scenario, :registration_scenario_id - attr_accessible :to_user, :from_user, :advertise_address, :sipp_options + attr_accessible :to, :from_user, :advertise_address, :sipp_options belongs_to :profile belongs_to :scenario belongs_to :receiver_scenario, class_name: "Scenario" @@ -50,7 +50,7 @@ def duplicate target_id: self.target.id, description: self.description, from_user: self.from_user, - to_user: self.to_user, + to: self.to, advertise_address: self.advertise_address, sipp_options: self.sipp_options, ) diff --git a/app/services/test_runner.rb b/app/services/test_runner.rb index 44df907..d193a47 100644 --- a/app/services/test_runner.rb +++ b/app/services/test_runner.rb @@ -93,7 +93,7 @@ def execute_runner number_of_calls: @test_run.profile.max_calls, calls_per_second: @test_run.profile.calls_per_second, max_concurrent: @test_run.profile.max_concurrent, - to_user: @test_run.to_user, + to: @test_run.to, transport_mode: @test_run.profile.transport_type.to_s, vmstat_buffer: @vmstat_buffer, advertise_address: @test_run.advertise_address, diff --git a/app/views/test_runs/_form.html.haml b/app/views/test_runs/_form.html.haml index ffde75d..4dc1c45 100644 --- a/app/views/test_runs/_form.html.haml +++ b/app/views/test_runs/_form.html.haml @@ -35,7 +35,7 @@ %span#target_display.help-inline.instructions.ajax_display_data .row-fluid .span12 - = f.input :to_user, label: 'SIP destination (user portion)' + = f.input :to, label: 'SIP destination (user portion or full address)' = f.input :from_user, label: 'SIP source (user portion)' = f.input :advertise_address, label: 'SIP advertise address' = f.label :sipp_options, label: 'SIPp command line options in SippyCup (YAML) format' diff --git a/app/views/test_runs/show.html.haml b/app/views/test_runs/show.html.haml index 28ac531..bc55957 100644 --- a/app/views/test_runs/show.html.haml +++ b/app/views/test_runs/show.html.haml @@ -56,8 +56,8 @@ %dt Target: = link_to @test_run.target_name, @test_run.target - %dd= "SIP user: #{@test_run.to_user}" - %dd= "Address: #{@test_run.target.address}" + %dd= "SIP user / address: #{@test_run.to}" + %dd= "Host: #{@test_run.target.address}" %dt Logs: %dd= link_to "Errors Report", @test_run.errors_report_file_url diff --git a/db/migrate/20150713191812_add_to_domain_to_test_runs.rb b/db/migrate/20150713191812_add_to_domain_to_test_runs.rb new file mode 100644 index 0000000..04be435 --- /dev/null +++ b/db/migrate/20150713191812_add_to_domain_to_test_runs.rb @@ -0,0 +1,5 @@ +class AddToDomainToTestRuns < ActiveRecord::Migration + def change + rename_column :test_runs, :to_user, :to + end +end diff --git a/spec/factories/test_run.rb b/spec/factories/test_run.rb index 908c816..d8ab312 100644 --- a/spec/factories/test_run.rb +++ b/spec/factories/test_run.rb @@ -5,7 +5,7 @@ scenario { FactoryGirl.build(:scenario) } profile { FactoryGirl.build(:profile) } target { FactoryGirl.build(:target) } - to_user '+14044754840' + to '+14044754840' from_user 'sippppp' advertise_address '10.5.5.1' sipp_options 'p: "101"' diff --git a/spec/models/test_run_spec.rb b/spec/models/test_run_spec.rb index 520df56..f6cf72f 100644 --- a/spec/models/test_run_spec.rb +++ b/spec/models/test_run_spec.rb @@ -203,7 +203,7 @@ it "should duplicate the test run" do test_run = FactoryGirl.create :test_run, user: FactoryGirl.build(:user), scenario: FactoryGirl.build(:scenario), profile: FactoryGirl.build(:profile), target: FactoryGirl.build(:target), name: "TestRun", - from_user: 'foobar', to_user: 'doodah', advertise_address: '127.0.0.1', sipp_options: 'p: "101"' + from_user: 'foobar', to: 'doodah', advertise_address: '127.0.0.1', sipp_options: 'p: "101"' new_tr = test_run.duplicate new_tr.user.should == test_run.user new_tr.scenario.should == test_run.scenario @@ -211,7 +211,7 @@ new_tr.target.should == test_run.target new_tr.name.should == "TestRun Retry 1" new_tr.from_user.should == 'foobar' - new_tr.to_user.should == 'doodah' + new_tr.to.should == 'doodah' new_tr.advertise_address.should == '127.0.0.1' new_tr.sipp_options.should == 'p: "101"' end diff --git a/spec/services/test_runner_spec.rb b/spec/services/test_runner_spec.rb index 9711c19..b715548 100644 --- a/spec/services/test_runner_spec.rb +++ b/spec/services/test_runner_spec.rb @@ -14,7 +14,7 @@ calls_per_second: test_run.profile.calls_per_second, max_concurrent: test_run.profile.max_concurrent, transport_mode: test_run.profile.transport_type.to_s, - to_user: '+14044754840', + to: '+14044754840', from_user: 'sippppp', advertise_address: '10.5.5.1', options: {'p' => '101'}, diff --git a/vendor/cache/sippy_cup-0.6.0.gem b/vendor/cache/sippy_cup-0.6.0.gem deleted file mode 100644 index e48b0e0..0000000 Binary files a/vendor/cache/sippy_cup-0.6.0.gem and /dev/null differ diff --git a/vendor/cache/sippy_cup-0.7.0.gem b/vendor/cache/sippy_cup-0.7.0.gem new file mode 100644 index 0000000..368c004 Binary files /dev/null and b/vendor/cache/sippy_cup-0.7.0.gem differ