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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-24 21:14:31 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-24 21:14:31 +0300
commit844eb8879aa445d8a5ee0f2ba3ee1ccf18319ef1 (patch)
tree051c632f870cbffd93efccda0711b3ae3a5885df /spec/services
parentb8d516a6876de74b68a800c5b69af9448b0de140 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/ci/retry_build_service_spec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/services/ci/retry_build_service_spec.rb b/spec/services/ci/retry_build_service_spec.rb
index 16635c64434..fc6ae267034 100644
--- a/spec/services/ci/retry_build_service_spec.rb
+++ b/spec/services/ci/retry_build_service_spec.rb
@@ -125,6 +125,14 @@ RSpec.describe Ci::RetryBuildService do
expect(new_build.needs_attributes).to match(build.needs_attributes)
expect(new_build.needs).not_to match(build.needs)
end
+
+ it 'clones only the job variables attributes' do
+ expect(new_build.job_variables.exists?).to be_truthy
+ expect(build.job_variables.exists?).to be_truthy
+
+ expect(new_build.job_variables_attributes).to match(build.job_variables_attributes)
+ expect(new_build.job_variables).not_to match(build.job_variables)
+ end
end
describe 'reject accessors' do
@@ -147,7 +155,7 @@ RSpec.describe Ci::RetryBuildService do
Ci::Build.attribute_names.map(&:to_sym) +
Ci::Build.attribute_aliases.keys.map(&:to_sym) +
Ci::Build.reflect_on_all_associations.map(&:name) +
- [:tag_list, :needs_attributes] -
+ [:tag_list, :needs_attributes, :job_variables_attributes] -
# ee-specific accessors should be tested in ee/spec/services/ci/retry_build_service_spec.rb instead
described_class.extra_accessors -
[:dast_site_profiles_build, :dast_scanner_profiles_build] # join tables