Change cache index delimiter to character not recognizable as variable part

This commit is contained in:
Tomasz Maczukin 2018-02-21 14:01:02 +01:00
parent 11bf575fe6
commit 5d814468d9
No known key found for this signature in database
GPG Key ID: 7E9EB2E4B0F625CD
2 changed files with 2 additions and 2 deletions

View File

@ -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]

View File

@ -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