diff options
author | prettyboy <prettyboy@yandex-team.com> | 2023-04-06 18:10:10 +0300 |
---|---|---|
committer | prettyboy <prettyboy@yandex-team.com> | 2023-04-06 18:10:10 +0300 |
commit | cf01db4c44585761db33d3f41fd3fe41a9acd70b (patch) | |
tree | e6cff885a2539e5918d897703a57b5b0bd87f9b8 /library/cpp/testing/common/ut/env_ut.cpp | |
parent | 208c5b52d89a6f0103b8b447cf2c9b6120cb772d (diff) | |
download | ydb-cf01db4c44585761db33d3f41fd3fe41a9acd70b.tar.gz |
[library/cpp/testing/common/ut/env] Added GetGlobalResource function to obtain global resources from context file
Diffstat (limited to 'library/cpp/testing/common/ut/env_ut.cpp')
-rw-r--r-- | library/cpp/testing/common/ut/env_ut.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/library/cpp/testing/common/ut/env_ut.cpp b/library/cpp/testing/common/ut/env_ut.cpp index 2aed1e4a25..fe4946a65f 100644 --- a/library/cpp/testing/common/ut/env_ut.cpp +++ b/library/cpp/testing/common/ut/env_ut.cpp @@ -160,3 +160,16 @@ TEST(Runtime, WatchProcessCore) { )json"; EXPECT_EQ(expected, data); } + +TEST(Runtime, GlobalResources) { + TString context = R"json({ + "resources": { + "global": { + "TOOL_NAME_RESOURCE_GLOBAL": "path" + } + } + })json"; + + auto filename = ReInitializeContext(context); + EXPECT_EQ("path", GetGlobalResource("TOOL_NAME_RESOURCE_GLOBAL")); +} |