summaryrefslogtreecommitdiff
path: root/test/other_tools/git_operations/git_config_run.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/other_tools/git_operations/git_config_run.test.cpp')
-rw-r--r--test/other_tools/git_operations/git_config_run.test.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/test/other_tools/git_operations/git_config_run.test.cpp b/test/other_tools/git_operations/git_config_run.test.cpp
index 9a9af9b9..8ffd744a 100644
--- a/test/other_tools/git_operations/git_config_run.test.cpp
+++ b/test/other_tools/git_operations/git_config_run.test.cpp
@@ -93,8 +93,24 @@ auto main(int argc, char* argv[]) -> int {
}
}
else if (test_type == "proxy") {
- Logger::Log(LogLevel::Error, "Proxy tests not yet implemented");
- return 1;
+ auto proxy_info =
+ GitConfigSettings::GetProxySettings(cfg, test_url, logger);
+ if (not proxy_info) {
+ Logger::Log(LogLevel::Error, "Missing proxy_info");
+ return 1;
+ }
+ // check expected result
+ auto expected_result =
+ (argc >= 4) ? std::make_optional<std::string>(args[3])
+ : std::nullopt;
+ auto actual_result = proxy_info.value();
+ if (actual_result != expected_result) {
+ Logger::Log(LogLevel::Error,
+ "Expected test result {}, but obtained {}",
+ expected_result ? *expected_result : "nullopt",
+ actual_result ? *actual_result : "nullopt");
+ return 1;
+ }
}
else {
Logger::Log(LogLevel::Error,