Skip to content

Commit b294509

Browse files
Use 'mock_cloud' if empty string is passed as cloud id to TFolderServiceAdapterMock (#8037)
1 parent f6c0935 commit b294509

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ydb/library/folder_service/mock/mock_folder_service_adapter.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#include <ydb/library/folder_service/events.h>
33
#include <ydb/library/actors/core/hfunc.h>
44

5+
static const TString MOCK_CLOUD_ID = "mock_cloud";
6+
57
namespace NKikimr::NFolderService {
68

79
class TFolderServiceAdapterMock
@@ -15,7 +17,9 @@ class TFolderServiceAdapterMock
1517
public:
1618
TFolderServiceAdapterMock(TMaybe<TString> mockedCloudId)
1719
: TBase(&TThis::StateWork)
18-
, MockedCloudId(mockedCloudId.GetOrElse("mock_cloud"))
20+
, MockedCloudId(mockedCloudId.Empty()
21+
? MOCK_CLOUD_ID
22+
: (mockedCloudId.Get()->empty() ? MOCK_CLOUD_ID : mockedCloudId.GetRef()))
1923
{
2024
}
2125

0 commit comments

Comments
 (0)