Skip to content

Commit

Permalink
Fixed test on Ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianReimold committed Nov 1, 2023
1 parent 9ed680f commit f4e71e5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/fineftp_test/src/permission_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
namespace
{
// https://everything.curl.dev/usingcurl/returns
constexpr int curl_return_code_ftp_download_failed = 19; // This is returned, when the file does not exist
constexpr int curl_return_code_ftp_access_denied = 9; // Curl@Ubuntu: This is returned, when the file exists, but the permissions prevent downloading
constexpr int curl_return_code_ftp_download_failed = 19; // Curl@Windows: This is returned, when the file does not exist
constexpr int curl_return_code_quote_command_error = 21;
constexpr int curl_return_code_upload_failed = 25;
constexpr int curl_return_code_login_failed = 67;
Expand Down Expand Up @@ -722,7 +723,8 @@ TEST(PermissionTest, DownloadFile)
else
{
// Test for Failure
ASSERT_EQ(curl_result, curl_return_code_resource_does_not_exist);
// ASSERT_EQ(curl_result, curl_return_code_resource_does_not_exist);
ASSERT_NE(curl_result, 0); // We test for != 0 here, as the curl return values differ too much between different Operating Systems

// Make sure that the file does not exist
ASSERT_FALSE(std::filesystem::exists(download_path));
Expand Down

0 comments on commit f4e71e5

Please sign in to comment.