diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-07-06 14:47:43 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-07-06 14:47:43 +0900 |
commit | 21399fbc31083dce37a37980668c408520a136e0 (patch) | |
tree | b9279c1a9c105521487b4edb32bc2c55069159e8 /spec | |
parent | 25bd5413200c9cd9368c753e2752f07735604547 (diff) | |
download | gitlab-ce-21399fbc31083dce37a37980668c408520a136e0.tar.gz |
Add spec for the ordering of the data stores
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/ci/build_trace_chunk_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/models/ci/build_trace_chunk_spec.rb b/spec/models/ci/build_trace_chunk_spec.rb index c0980328070..774a638b430 100644 --- a/spec/models/ci/build_trace_chunk_spec.rb +++ b/spec/models/ci/build_trace_chunk_spec.rb @@ -38,6 +38,22 @@ describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do end end + describe '.all_stores' do + subject { described_class.all_stores } + + it 'returns a correctly ordered array' do + is_expected.to eq(%w[redis database fog]) + end + + it 'returns redis store as the the lowest precedence' do + expect(subject.first).to eq('redis') + end + + it 'returns fog store as the the highest precedence' do + expect(subject.last).to eq('fog') + end + end + describe '#data' do subject { build_trace_chunk.data } |