File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ cases:
155155 - proc : open page
156156 exec :
157157 operate : go
158- url : <%= ENV['FQDN '] %>/results # Using erb notation to get environment variable
158+ url : <%= ENV['BASE_FQDN '] %>/results # Using erb notation to get environment variable
159159 - proc : element click
160160 exec :
161161 operate : click
@@ -224,7 +224,7 @@ cases:
224224 desc : status check for detail page
225225 urls :
226226 - https://example.com/detail/1
227- - <%= ENV['FQDN '] %>/detail/2 # Using erb notation to get environment variable
227+ - <%= ENV['BASE_FQDN '] %>/detail/2 # Using erb notation to get environment variable
228228` ` `
229229
230230# Development
Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ def setup_test_cond(test_cond)
135135 %i[ suite_name case label xlabel device ] . each do |k |
136136 test_cond [ k ] = test_cond [ k ] . split ( ',' ) unless test_cond [ k ] . nil?
137137 end
138+ test_cond [ :base_fqdn ] = ENV [ 'BASE_FQDN' ] ||= ''
138139 test_cond
139140end
140141
Original file line number Diff line number Diff line change @@ -15,11 +15,13 @@ def initialize
1515
1616 # Save job data and return job id
1717 # @param [Time] start_time
18+ # @param [String] command_and_option
19+ # @param [String] fqdn
1820 # @return [Fixnum] job_id
19- def save_job_record_and_get_job_id ( start_time , command_and_option )
21+ def save_job_record_and_get_job_id ( start_time , command_and_option , fqdn )
2022 return 0 if $debug
2123
22- job_id = @connector . con [ :jobs ] . insert ( start_time : start_time , command_and_option : command_and_option )
24+ job_id = @connector . con [ :jobs ] . insert ( start_time : start_time , command_and_option : command_and_option , base_fqdn : fqdn )
2325 @connector . disconnect
2426 job_id
2527 end
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ def initialize(test_cond)
9393 @re_test_count = @test_cond [ :re_test_count ]
9494 @tdo = Bucky ::Core ::Database ::TestDataOperator . new
9595 @start_time = Time . now
96- $job_id = @tdo . save_job_record_and_get_job_id ( @start_time , @test_cond [ :command_and_option ] )
96+ $job_id = @tdo . save_job_record_and_get_job_id ( @start_time , @test_cond [ :command_and_option ] , @test_cond [ :base_fqdn ] )
9797 @json_report = {
9898 summary : {
9999 cases_count : 0 ,
Original file line number Diff line number Diff line change 2424 describe '#save_job_record_and_get_job_id' do
2525 let ( :start_time ) { Time . now }
2626 let ( :command_and_option ) { 'bucky run -t e2e' }
27+ let ( :fqdn ) { 'https://example.com' }
2728 before do
2829 allow ( con_double ) . to receive ( :[] ) . and_return ( sequel_instance_double )
2930 allow ( db_connector_double ) . to receive ( :con ) . and_return ( con_double )
3031 end
3132 it 'call Sequel#insert' do
3233 expect ( sequel_instance_double ) . to receive ( :insert )
33- subject . save_job_record_and_get_job_id ( start_time , command_and_option )
34+ subject . save_job_record_and_get_job_id ( start_time , command_and_option , fqdn )
3435 end
3536 it 'return job_id' do
3637 allow ( sequel_instance_double ) . to receive ( :insert ) . and_return ( 1 )
37- expect ( subject . save_job_record_and_get_job_id ( start_time , command_and_option ) ) . to eq 1
38+ expect ( subject . save_job_record_and_get_job_id ( start_time , command_and_option , fqdn ) ) . to eq 1
3839 end
3940 it 'disconnect database' do
4041 allow ( sequel_instance_double ) . to receive ( :insert )
4142 expect ( db_connector_double ) . to receive ( :disconnect )
42- subject . save_job_record_and_get_job_id ( start_time , command_and_option )
43+ subject . save_job_record_and_get_job_id ( start_time , command_and_option , fqdn )
4344 end
4445 end
4546
You can’t perform that action at this time.
0 commit comments