summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/exclusive_lease_helpers_spec.rb
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-11-23 17:25:11 +0100
committerKamil Trzciński <ayufan@ayufan.eu>2018-11-27 17:55:20 +0100
commit31a1ce2132d83e333e84f365b9aada2e17c61b43 (patch)
tree66d3a02000d2998f7b6f583ed669fd59939c88e7 /spec/lib/gitlab/exclusive_lease_helpers_spec.rb
parent2e3dab38295b7c36ab100f20c654fdfaf9b00885 (diff)
downloadgitlab-ce-31a1ce2132d83e333e84f365b9aada2e17c61b43.tar.gz
Lock writes to trace stream
Diffstat (limited to 'spec/lib/gitlab/exclusive_lease_helpers_spec.rb')
-rw-r--r--spec/lib/gitlab/exclusive_lease_helpers_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/exclusive_lease_helpers_spec.rb b/spec/lib/gitlab/exclusive_lease_helpers_spec.rb
index 2e3656b52fb..5107e1efbbd 100644
--- a/spec/lib/gitlab/exclusive_lease_helpers_spec.rb
+++ b/spec/lib/gitlab/exclusive_lease_helpers_spec.rb
@@ -11,6 +11,14 @@ describe Gitlab::ExclusiveLeaseHelpers, :clean_gitlab_redis_shared_state do
let(:options) { {} }
+ context 'when unique key is not set' do
+ let(:unique_key) { }
+
+ it 'raises an error' do
+ expect { subject }.to raise_error ArgumentError
+ end
+ end
+
context 'when the lease is not obtained yet' do
before do
stub_exclusive_lease(unique_key, 'uuid')