← Commit list

9f1102cf74

Stefan Eissing
Stefan Eissing
2025-09-03
FAILED Duration: 180s

Subject

pytest: add tests for getting a non-existing ftp file

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

tests/http/test_30_vsftpd.py+7 -0
@@ -215,6 +215,13 @@ class TestVsFTPD:
r.check_stats(count=count, http_status=226)
self.check_upload(env, vsftpd, docname=docname, binary=False)
+ def test_30_11_download_non_existing(self, env: Env, vsftpd: VsFTPD):
+ curl = CurlClient(env=env)
+ url = f'ftp://{env.ftp_domain}:{vsftpd.port}/does-not-exist'
+ r = curl.ftp_get(urls=[url], with_stats=True)
+ r.check_exit_code(78)
+ r.check_stats(count=1, exitcode=78)
+
def check_downloads(self, client, srcfile: str, count: int,
complete: bool = True):
for i in range(count):
tests/http/test_31_vsftpds.py+7 -0
@@ -246,6 +246,13 @@ class TestVsFTPD:
expdata = [indata] if len(indata) else []
assert expdata == destdata, f'expected: {expdata}, got: {destdata}'
+ def test_31_11_download_non_existing(self, env: Env, vsftpds: VsFTPD):
+ curl = CurlClient(env=env)
+ url = f'ftp://{env.ftp_domain}:{vsftpds.port}/does-not-exist'
+ r = curl.ftp_ssl_get(urls=[url], with_stats=True)
+ r.check_exit_code(78)
+ r.check_stats(count=1, exitcode=78)
+
def check_downloads(self, client, srcfile: str, count: int,
complete: bool = True):
for i in range(count):
tests/http/test_32_ftps_vsftpd.py+7 -0
@@ -258,6 +258,13 @@ class TestFtpsVsFTPD:
expdata = [indata] if len(indata) else []
assert expdata == destdata, f'expected: {expdata}, got: {destdata}'
+ def test_32_11_download_non_existing(self, env: Env, vsftpds: VsFTPD):
+ curl = CurlClient(env=env)
+ url = f'ftps://{env.ftp_domain}:{vsftpds.port}/does-not-exist'
+ r = curl.ftp_get(urls=[url], with_stats=True)
+ r.check_exit_code(78)
+ r.check_stats(count=1, exitcode=78)
+
def check_downloads(self, client, srcfile: str, count: int,
complete: bool = True):
for i in range(count):