Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-05-25 10:34:03 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-05-25 10:34:03 +0300
commit3e190d80310d900beaf42881e933ae4d3c2811a0 (patch)
tree26c110aceab0eff2f6c16af54531903b1553c123
parentcafe62b84a9c806535d604ff21c76548b6b06b68 (diff)
Fix tests for adding environment_url
-rw-r--r--app/services/ci/retry_build_service.rb4
-rw-r--r--spec/factories/ci/builds.rb4
-rw-r--r--spec/lib/ci/gitlab_ci_yaml_processor_spec.rb7
-rw-r--r--spec/lib/gitlab/import_export/safe_model_attributes.yml1
4 files changed, 13 insertions, 3 deletions
diff --git a/app/services/ci/retry_build_service.rb b/app/services/ci/retry_build_service.rb
index f51e9fd1d54..8e406d22f15 100644
--- a/app/services/ci/retry_build_service.rb
+++ b/app/services/ci/retry_build_service.rb
@@ -2,8 +2,8 @@ module Ci
class RetryBuildService < ::BaseService
CLONE_ACCESSORS = %i[pipeline project ref tag options commands name
allow_failure stage stage_idx trigger_request
- yaml_variables when environment coverage_regex
- description tag_list].freeze
+ yaml_variables when environment environment_url
+ coverage_regex description tag_list].freeze
def execute(build)
reprocess!(build).tap do |new_build|
diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb
index f5e99fdf00b..aeabb57c512 100644
--- a/spec/factories/ci/builds.rb
+++ b/spec/factories/ci/builds.rb
@@ -63,8 +63,10 @@ FactoryGirl.define do
trait :teardown_environment do
environment 'staging'
+ environment_url 'http://staging.example.com/$CI_JOB_NAME'
options environment: { name: 'staging',
- action: 'stop' }
+ action: 'stop',
+ url: 'http://staging.example.com/$CI_JOB_NAME' }
end
trait :allowed_to_fail do
diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
index fe2c00bb2ca..1b3f08d1384 100644
--- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
+++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
@@ -105,6 +105,7 @@ module Ci
allow_failure: false,
when: "on_success",
environment: nil,
+ environment_url: nil,
yaml_variables: []
})
end
@@ -523,6 +524,7 @@ module Ci
allow_failure: false,
when: "on_success",
environment: nil,
+ environment_url: nil,
yaml_variables: []
})
end
@@ -552,6 +554,7 @@ module Ci
allow_failure: false,
when: "on_success",
environment: nil,
+ environment_url: nil,
yaml_variables: []
})
end
@@ -798,6 +801,7 @@ module Ci
when: "on_success",
allow_failure: false,
environment: nil,
+ environment_url: nil,
yaml_variables: []
})
end
@@ -1001,6 +1005,7 @@ module Ci
when: "on_success",
allow_failure: false,
environment: nil,
+ environment_url: nil,
yaml_variables: []
})
end
@@ -1047,6 +1052,7 @@ module Ci
when: "on_success",
allow_failure: false,
environment: nil,
+ environment_url: nil,
yaml_variables: []
})
expect(subject.second).to eq({
@@ -1060,6 +1066,7 @@ module Ci
when: "on_success",
allow_failure: false,
environment: nil,
+ environment_url: nil,
yaml_variables: []
})
end
diff --git a/spec/lib/gitlab/import_export/safe_model_attributes.yml b/spec/lib/gitlab/import_export/safe_model_attributes.yml
index 96054c996fd..8feb6c32f64 100644
--- a/spec/lib/gitlab/import_export/safe_model_attributes.yml
+++ b/spec/lib/gitlab/import_export/safe_model_attributes.yml
@@ -224,6 +224,7 @@ CommitStatus:
- erased_at
- artifacts_expire_at
- environment
+- environment_url
- artifacts_size
- when
- yaml_variables