diff options
Diffstat (limited to 'spec/factories/ci/build_trace_chunks.rb')
-rw-r--r-- | spec/factories/ci/build_trace_chunks.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/factories/ci/build_trace_chunks.rb b/spec/factories/ci/build_trace_chunks.rb index 64a297932de..56d8fc23222 100644 --- a/spec/factories/ci/build_trace_chunks.rb +++ b/spec/factories/ci/build_trace_chunks.rb @@ -22,6 +22,22 @@ FactoryBot.define do data_store { :redis } end + trait :redis_trace_chunks_with_data do + data_store { :redis_trace_chunks } + + transient do + initial_data { 'test data' } + end + + after(:create) do |build_trace_chunk, evaluator| + Ci::BuildTraceChunks::RedisTraceChunks.new.set_data(build_trace_chunk, evaluator.initial_data) + end + end + + trait :redis_trace_chunks_without_data do + data_store { :redis_trace_chunks } + end + trait :database_with_data do data_store { :database } |