From ed0cd750a98a9334f95d99a5ba4ce3abe17538f1 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Fri, 12 Jul 2024 09:56:36 +0200 Subject: test: Reduce verbosity in config methods As the classes describe the config type, their static creators can have generic names, which reduces unnecessary verbosity. --- test/utils/remote_execution/bazel_action_creator.hpp | 2 +- test/utils/remote_execution/main-remote-execution.cpp | 2 +- test/utils/remote_execution/test_auth_config.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'test/utils/remote_execution') diff --git a/test/utils/remote_execution/bazel_action_creator.hpp b/test/utils/remote_execution/bazel_action_creator.hpp index 38468535..1199a385 100644 --- a/test/utils/remote_execution/bazel_action_creator.hpp +++ b/test/utils/remote_execution/bazel_action_creator.hpp @@ -83,7 +83,7 @@ auto action_id = ArtifactDigest::Create(action_data); blobs.emplace_back(action_id, action_data, /*is_exec=*/false); - auto auth_config = TestAuthConfig::ReadAuthConfigFromEnvironment(); + auto auth_config = TestAuthConfig::ReadFromEnvironment(); if (not auth_config) { return nullptr; } diff --git a/test/utils/remote_execution/main-remote-execution.cpp b/test/utils/remote_execution/main-remote-execution.cpp index 091a8038..e18ceb5a 100644 --- a/test/utils/remote_execution/main-remote-execution.cpp +++ b/test/utils/remote_execution/main-remote-execution.cpp @@ -45,7 +45,7 @@ void wait_for_grpc_to_shutdown() { ReadCompatibilityFromEnv(); // Ensure authentication config is available - if (not TestAuthConfig::ReadAuthConfigFromEnvironment()) { + if (not TestAuthConfig::ReadFromEnvironment()) { std::exit(EXIT_FAILURE); } diff --git a/test/utils/remote_execution/test_auth_config.hpp b/test/utils/remote_execution/test_auth_config.hpp index fd157f22..2f5cca25 100644 --- a/test/utils/remote_execution/test_auth_config.hpp +++ b/test/utils/remote_execution/test_auth_config.hpp @@ -26,7 +26,7 @@ class TestAuthConfig final { public: - [[nodiscard]] static auto ReadAuthConfigFromEnvironment() noexcept + [[nodiscard]] static auto ReadFromEnvironment() noexcept -> std::optional { Auth::TLS::Builder tls_builder; auto config = tls_builder.SetCACertificate(ReadTLSAuthCACertFromEnv()) -- cgit v1.2.3