File tree 5 files changed +12
-8
lines changed 5 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ cases:
155
155
- proc : open page
156
156
exec :
157
157
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
159
159
- proc : element click
160
160
exec :
161
161
operate : click
@@ -224,7 +224,7 @@ cases:
224
224
desc : status check for detail page
225
225
urls :
226
226
- 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
228
228
` ` `
229
229
230
230
# Development
Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ def setup_test_cond(test_cond)
135
135
%i[ suite_name case label xlabel device ] . each do |k |
136
136
test_cond [ k ] = test_cond [ k ] . split ( ',' ) unless test_cond [ k ] . nil?
137
137
end
138
+ test_cond [ :base_fqdn ] = ENV [ 'BASE_FQDN' ] ||= ''
138
139
test_cond
139
140
end
140
141
Original file line number Diff line number Diff line change @@ -15,11 +15,13 @@ def initialize
15
15
16
16
# Save job data and return job id
17
17
# @param [Time] start_time
18
+ # @param [String] command_and_option
19
+ # @param [String] fqdn
18
20
# @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 )
20
22
return 0 if $debug
21
23
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 )
23
25
@connector . disconnect
24
26
job_id
25
27
end
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ def initialize(test_cond)
93
93
@re_test_count = @test_cond [ :re_test_count ]
94
94
@tdo = Bucky ::Core ::Database ::TestDataOperator . new
95
95
@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 ] )
97
97
@json_report = {
98
98
summary : {
99
99
cases_count : 0 ,
Original file line number Diff line number Diff line change 24
24
describe '#save_job_record_and_get_job_id' do
25
25
let ( :start_time ) { Time . now }
26
26
let ( :command_and_option ) { 'bucky run -t e2e' }
27
+ let ( :fqdn ) { 'https://example.com' }
27
28
before do
28
29
allow ( con_double ) . to receive ( :[] ) . and_return ( sequel_instance_double )
29
30
allow ( db_connector_double ) . to receive ( :con ) . and_return ( con_double )
30
31
end
31
32
it 'call Sequel#insert' do
32
33
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 )
34
35
end
35
36
it 'return job_id' do
36
37
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
38
39
end
39
40
it 'disconnect database' do
40
41
allow ( sequel_instance_double ) . to receive ( :insert )
41
42
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 )
43
44
end
44
45
end
45
46
You can’t perform that action at this time.
0 commit comments