Skip to content

Commit 413555d

Browse files
RUBY-3154 Fix broken mongocryptd spec (#2704)
1 parent 75d392c commit 413555d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

spec/integration/client_side_encryption/mongocryptd_prose_spec.rb

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@
3030
)
3131
end
3232

33+
before(:each) do
34+
skip 'This test requires crypt shared library' unless SpecConfig.instance.crypt_shared_lib_path
35+
36+
key_vault_collection.drop
37+
key_vault_collection.insert_one(data_key)
38+
39+
encryption_client['users'].drop
40+
end
41+
3342
context 'when shared library is loaded' do
3443
let(:extra_options) do
3544
{
@@ -70,8 +79,6 @@ def done!
7079
end
7180

7281
it 'does not try to connect to mongocryptd' do
73-
skip 'This test requires crypt shared library' unless SpecConfig.instance.crypt_shared_lib_path
74-
7582
encryption_client[:users].insert_one(ssn: ssn)
7683
expect(connect_attempt.done?).to eq(false)
7784
end
@@ -88,8 +95,6 @@ def done!
8895
end
8996

9097
it 'does not spawn mongocryptd' do
91-
skip 'This test requires crypt shared library' unless SpecConfig.instance.crypt_shared_lib_path
92-
9398
expect do
9499
encryption_client[:users].insert_one(ssn: ssn)
95100
end.not_to raise_error

0 commit comments

Comments
 (0)