From 237d5636271a1a78b02a0eb7feaab7dfb9dfed57 Mon Sep 17 00:00:00 2001 From: Sven Baars Date: Thu, 24 Oct 2019 20:21:22 +0200 Subject: [PATCH] wininet/tests: Skip some FTP tests when no connection can be made. Signed-off-by: Sven Baars Signed-off-by: Alexandre Julliard --- dlls/wininet/tests/ftp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/wininet/tests/ftp.c b/dlls/wininet/tests/ftp.c index 317b2914951..c6d972a3523 100644 --- a/dlls/wininet/tests/ftp.c +++ b/dlls/wininet/tests/ftp.c @@ -63,7 +63,7 @@ static void test_connect(HINTERNET hInternet) HINTERNET hFtp; /* Try a few username/password combinations: - * anonymous : NULL + * anonymous : IEUser@ * NULL : IEUser@ * NULL : NULL * "" : IEUser@ @@ -72,14 +72,14 @@ static void test_connect(HINTERNET hInternet) SetLastError(0xdeadbeef); hFtp = InternetConnectA(hInternet, "ftp.winehq.org", INTERNET_DEFAULT_FTP_PORT, "anonymous", "IEUser@", INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 0); - if (hFtp) /* some servers accept an empty password */ + if (!hFtp) { - ok ( GetLastError() == ERROR_SUCCESS, "ERROR_SUCCESS, got %d\n", GetLastError()); - InternetCloseHandle(hFtp); + skip("No ftp connection could be made to ftp.winehq.org %u\n", GetLastError()); + return; } - else - ok ( GetLastError() == ERROR_INTERNET_LOGIN_FAILURE, - "Expected ERROR_INTERNET_LOGIN_FAILURE, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, + "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + InternetCloseHandle(hFtp); SetLastError(0xdeadbeef); hFtp = InternetConnectA(hInternet, "ftp.winehq.org", INTERNET_DEFAULT_FTP_PORT, NULL, "IEUser@", INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 0);