summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2018-02-21 14:01:02 +0100
committerTomasz Maczukin <tomasz@maczukin.pl>2018-02-21 14:01:02 +0100
commit5d814468d9f0fc0e892100471f0b5cc7f031f2e3 (patch)
tree4f1af3172bdb3e86bf2ab8253eb7da7856141381
parent11bf575fe64e55cc932c5629e2d8d103109e0b2b (diff)
downloadgitlab-ce-5d814468d9f0fc0e892100471f0b5cc7f031f2e3.tar.gz
Change cache index delimiter to character not recognizable as variable part
-rw-r--r--app/models/ci/build.rb2
-rw-r--r--spec/models/ci/build_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index ee987949080..b230b7f47ef 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -467,7 +467,7 @@ module Ci
if cache && project.jobs_cache_index
cache = cache.merge(
- key: "#{cache[:key]}_#{project.jobs_cache_index}")
+ key: "#{cache[:key]}-#{project.jobs_cache_index}")
end
[cache]
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 2b6b6a61182..c27313ed88b 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -277,7 +277,7 @@ describe Ci::Build do
allow_any_instance_of(Project).to receive(:jobs_cache_index).and_return(1)
end
- it { is_expected.to be_an(Array).and all(include(key: "key_1")) }
+ it { is_expected.to be_an(Array).and all(include(key: "key-1")) }
end
context 'when project does not have jobs_cache_index' do