Sha256: 83f00dfa82ad5b5b7586b3c4dde405a22fd1d0fcc3b1dfbaed8611912c561720
Contents?: true
Size: 1.16 KB
Versions: 14
Compression:
Stored size: 1.16 KB
Contents
require 'spec_helper' describe 'Client-Side Encryption' do describe 'Prose tests: Data key and double encryption' do require_libmongocrypt require_enterprise min_server_fcv '4.2' include_context 'define shared FLE helpers' let(:client) do new_local_client( SpecConfig.instance.addresses, SpecConfig.instance.test_options ) end let(:client_encrypted) do new_local_client( SpecConfig.instance.addresses, SpecConfig.instance.test_options.merge( auto_encryption_options: { kms_providers: local_kms_providers, key_vault_namespace: 'admin.datakeys', # Spawn mongocryptd on non-default port for sharded cluster tests extra_options: extra_options, }, database: 'db', ) ) end before do client.use('db')['view'].drop client.use('db').database.command(create: 'view', viewOn: 'coll') end it 'does not perform encryption on views' do expect do client_encrypted['view'].insert_one({}) end.to raise_error(Mongo::Error::CryptError, /cannot auto encrypt a view/) end end end
Version data entries
14 entries across 14 versions & 1 rubygems