Commit 3e190d80 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Fix tests for adding environment_url

parent cafe62b8
...@@ -2,8 +2,8 @@ module Ci ...@@ -2,8 +2,8 @@ module Ci
class RetryBuildService < ::BaseService class RetryBuildService < ::BaseService
CLONE_ACCESSORS = %i[pipeline project ref tag options commands name CLONE_ACCESSORS = %i[pipeline project ref tag options commands name
allow_failure stage stage_idx trigger_request allow_failure stage stage_idx trigger_request
yaml_variables when environment coverage_regex yaml_variables when environment environment_url
description tag_list].freeze coverage_regex description tag_list].freeze
def execute(build) def execute(build)
reprocess!(build).tap do |new_build| reprocess!(build).tap do |new_build|
......
...@@ -63,8 +63,10 @@ FactoryGirl.define do ...@@ -63,8 +63,10 @@ FactoryGirl.define do
trait :teardown_environment do trait :teardown_environment do
environment 'staging' environment 'staging'
environment_url 'http://staging.example.com/$CI_JOB_NAME'
options environment: { name: 'staging', options environment: { name: 'staging',
action: 'stop' } action: 'stop',
url: 'http://staging.example.com/$CI_JOB_NAME' }
end end
trait :allowed_to_fail do trait :allowed_to_fail do
......
...@@ -105,6 +105,7 @@ module Ci ...@@ -105,6 +105,7 @@ module Ci
allow_failure: false, allow_failure: false,
when: "on_success", when: "on_success",
environment: nil, environment: nil,
environment_url: nil,
yaml_variables: [] yaml_variables: []
}) })
end end
...@@ -523,6 +524,7 @@ module Ci ...@@ -523,6 +524,7 @@ module Ci
allow_failure: false, allow_failure: false,
when: "on_success", when: "on_success",
environment: nil, environment: nil,
environment_url: nil,
yaml_variables: [] yaml_variables: []
}) })
end end
...@@ -552,6 +554,7 @@ module Ci ...@@ -552,6 +554,7 @@ module Ci
allow_failure: false, allow_failure: false,
when: "on_success", when: "on_success",
environment: nil, environment: nil,
environment_url: nil,
yaml_variables: [] yaml_variables: []
}) })
end end
...@@ -798,6 +801,7 @@ module Ci ...@@ -798,6 +801,7 @@ module Ci
when: "on_success", when: "on_success",
allow_failure: false, allow_failure: false,
environment: nil, environment: nil,
environment_url: nil,
yaml_variables: [] yaml_variables: []
}) })
end end
...@@ -1001,6 +1005,7 @@ module Ci ...@@ -1001,6 +1005,7 @@ module Ci
when: "on_success", when: "on_success",
allow_failure: false, allow_failure: false,
environment: nil, environment: nil,
environment_url: nil,
yaml_variables: [] yaml_variables: []
}) })
end end
...@@ -1047,6 +1052,7 @@ module Ci ...@@ -1047,6 +1052,7 @@ module Ci
when: "on_success", when: "on_success",
allow_failure: false, allow_failure: false,
environment: nil, environment: nil,
environment_url: nil,
yaml_variables: [] yaml_variables: []
}) })
expect(subject.second).to eq({ expect(subject.second).to eq({
...@@ -1060,6 +1066,7 @@ module Ci ...@@ -1060,6 +1066,7 @@ module Ci
when: "on_success", when: "on_success",
allow_failure: false, allow_failure: false,
environment: nil, environment: nil,
environment_url: nil,
yaml_variables: [] yaml_variables: []
}) })
end end
......
...@@ -224,6 +224,7 @@ CommitStatus: ...@@ -224,6 +224,7 @@ CommitStatus:
- erased_at - erased_at
- artifacts_expire_at - artifacts_expire_at
- environment - environment
- environment_url
- artifacts_size - artifacts_size
- when - when
- yaml_variables - yaml_variables
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment