Skip to content

Commit c6e6797

Browse files
committed
[NBS] ability to override the NBS's binary file path; tweak encryption_at_rest
1 parent ca5d0e3 commit c6e6797

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

cloud/blockstore/tests/encryption_at_rest/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def read_first_block():
177177
assert vol0.EncryptionDesc.Mode == ENCRYPTION_DEFAULT_AES_XTS
178178

179179
assert vol0.EncryptionDesc.EncryptionKey.KekId == KEK_ID
180-
assert len(vol0.EncryptionDesc.EncryptionKey.EncryptedDEK) == 512
180+
assert len(vol0.EncryptionDesc.EncryptionKey.EncryptedDEK) >= 32
181181

182182
expected_data = os.urandom(4096)
183183

cloud/blockstore/tests/python/lib/daemon.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import json
2+
import os
23
import requests
3-
import subprocess
44
import socket
5+
import subprocess
56
import time
67

78
from .config import NbsConfigurator
@@ -22,6 +23,11 @@
2223
ensure_path_exists
2324

2425

26+
def __get_bin_path(name, default):
27+
return yatest_common.binary_path(
28+
yatest_common.get_param(name) or os.environ.get(name, default))
29+
30+
2531
def _match(labels, query):
2632
for name, value in query.items():
2733
v = labels.get(name)
@@ -145,7 +151,10 @@ def wait_for_registration(self, delay_sec=1, max_retry_number=None):
145151

146152

147153
def start_nbs(config: NbsConfigurator, name='nbs-server'):
148-
exe_path = yatest_common.binary_path("cloud/blockstore/apps/server/nbsd")
154+
155+
exe_path = __get_bin_path(
156+
"NBS_SERVER_PATH",
157+
"cloud/blockstore/apps/server/nbsd")
149158

150159
cwd = get_unique_path_for_current_test(
151160
output_path=yatest_common.output_path(),
@@ -176,7 +185,10 @@ def start_nbs(config: NbsConfigurator, name='nbs-server'):
176185

177186

178187
def start_disk_agent(config: NbsConfigurator, name='disk-agent'):
179-
exe_path = yatest_common.binary_path("cloud/blockstore/apps/disk_agent/diskagentd")
188+
189+
exe_path = __get_bin_path(
190+
"DISK_AGENT_PATH",
191+
"cloud/blockstore/apps/disk_agent/diskagentd")
180192

181193
cwd = get_unique_path_for_current_test(
182194
output_path=yatest_common.output_path(),

0 commit comments

Comments
 (0)