-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathenv.rb
More file actions
33 lines (29 loc) · 1022 Bytes
/
env.rb
File metadata and controls
33 lines (29 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# frozen_string_literal: true
require 'asherah'
require 'base64'
SERVICE_NAME = ENV.fetch('ASHERAH_SERVICE_NAME')
PRODUCT_ID = ENV.fetch('ASHERAH_PRODUCT_NAME')
KMS = ENV.fetch('ASHERAH_KMS_MODE')
DB_NAME = ENV.fetch('TEST_DB_NAME')
DB_USER = ENV.fetch('TEST_DB_USER')
DB_PASS = ENV.fetch('TEST_DB_PASSWORD')
DB_PORT = ENV.fetch('TEST_DB_PORT')
DB_HOST = ENV.fetch('TEST_DB_HOSTNAME', 'localhost')
CONNECTION_STRING = "#{DB_USER}:#{DB_PASS}@tcp(#{DB_HOST}:#{DB_PORT})/#{DB_NAME}?tls=skip-verify"
TMP_DIR = '/tmp/'
FILE_NAME = 'ruby_encrypted'
METASTORE = 'rdbms'
Before do |_scenario|
Asherah.configure do |config|
config.service_name = SERVICE_NAME
config.product_id = PRODUCT_ID
config.metastore = METASTORE
config.connection_string = CONNECTION_STRING
config.kms = KMS
config.enable_session_caching = true
config.verbose = false
end
end
After do |_scenario|
Asherah.shutdown
end