diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-10-08 15:34:56 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-10-08 15:41:50 +0200 |
commit | c9325cea0aa43f328644157dee4eafe3d7b45e6f (patch) | |
tree | 7c688b9cfd8acf45771193f41d69639f9a47dfab /test/other_tools/utils/curl_usage.test.cpp | |
parent | 0e024eb055e6e8272f419e898ae9eefd0085c34f (diff) | |
download | justbuild-c9325cea0aa43f328644157dee4eafe3d7b45e6f.tar.gz |
Name local variables using lower_case
...and private members using lower_case_
Diffstat (limited to 'test/other_tools/utils/curl_usage.test.cpp')
-rw-r--r-- | test/other_tools/utils/curl_usage.test.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/other_tools/utils/curl_usage.test.cpp b/test/other_tools/utils/curl_usage.test.cpp index d3b3fd49..980793bf 100644 --- a/test/other_tools/utils/curl_usage.test.cpp +++ b/test/other_tools/utils/curl_usage.test.cpp @@ -38,27 +38,27 @@ TEST_CASE("Curl context", "[curl_context]") { } TEST_CASE("Curl easy handle", "[curl_easy_handle]") { - auto kServerUrl = std::string("http://127.0.0.1:") + getPort() + - std::string("/test_file.txt"); - auto kTargetDir = + auto const serve_url = std::string("http://127.0.0.1:") + getPort() + + std::string("/test_file.txt"); + auto const target_dir = std::filesystem::path(std::getenv("TEST_TMPDIR")) / "target_dir"; // make target dir - CHECK(FileSystemManager::CreateDirectory(kTargetDir)); + CHECK(FileSystemManager::CreateDirectory(target_dir)); // create handle auto curl_handle = CurlEasyHandle::Create(); REQUIRE(curl_handle); SECTION("Curl download to file") { // download test file from local HTTP server into new location - auto file_path = kTargetDir / "test_file.txt"; - REQUIRE(curl_handle->DownloadToFile(kServerUrl, file_path) == 0); + auto file_path = target_dir / "test_file.txt"; + REQUIRE(curl_handle->DownloadToFile(serve_url, file_path) == 0); REQUIRE(FileSystemManager::IsFile(file_path)); } SECTION("Curl download to string") { // download test file from local HTTP server into string - auto content = curl_handle->DownloadToString(kServerUrl); + auto content = curl_handle->DownloadToString(serve_url); REQUIRE(content); REQUIRE(*content == "test\n"); } |