summaryrefslogtreecommitdiffstats
path: root/library/cpp/tvmauth/client/misc/tool/settings.cpp
diff options
context:
space:
mode:
authorkomels <[email protected]>2022-04-15 16:53:39 +0300
committerkomels <[email protected]>2022-04-15 16:53:39 +0300
commit703a2fb6e100d202d1c7fcd052d73bd5affef408 (patch)
tree22b7320c06bb04d86dbf7b9af9ae44281331cd15 /library/cpp/tvmauth/client/misc/tool/settings.cpp
parent3375bbfda1e2afb03aa2072bf5f2f2c3a26026e8 (diff)
Move 'kikimr/yndx'-depending tests out of ydb/core
ref:0a380e13308d579e0545a76924330d1ca5129c43
Diffstat (limited to 'library/cpp/tvmauth/client/misc/tool/settings.cpp')
-rw-r--r--library/cpp/tvmauth/client/misc/tool/settings.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/library/cpp/tvmauth/client/misc/tool/settings.cpp b/library/cpp/tvmauth/client/misc/tool/settings.cpp
deleted file mode 100644
index 894501f19d2..00000000000
--- a/library/cpp/tvmauth/client/misc/tool/settings.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-#include "settings.h"
-
-#include <library/cpp/string_utils/url/url.h>
-
-#include <util/system/env.h>
-
-namespace NTvmAuth::NTvmTool {
- TClientSettings::TClientSettings(const TAlias& selfAias)
- : SelfAias_(selfAias)
- , Hostname_("localhost")
- , Port_(1)
- , SocketTimeout_(TDuration::Seconds(5))
- , ConnectTimeout_(TDuration::Seconds(30))
- {
- AuthToken_ = GetEnv("TVMTOOL_LOCAL_AUTHTOKEN");
- if (!AuthToken_) {
- AuthToken_ = GetEnv("QLOUD_TVM_TOKEN");
- }
- TStringBuf auth(AuthToken_);
- FixSpaces(auth);
- AuthToken_ = auth;
-
- const TString url = GetEnv("DEPLOY_TVM_TOOL_URL");
- if (url) {
- TStringBuf scheme, host;
- TryGetSchemeHostAndPort(url, scheme, host, Port_);
- }
-
- Y_ENSURE_EX(SelfAias_, TBrokenTvmClientSettings() << "Alias for your TVM client cannot be empty");
- }
-
- void TClientSettings::FixSpaces(TStringBuf& str) {
- while (str && isspace(str.back())) {
- str.Chop(1);
- }
- }
-}