test_vp_ftp_port.py 756 B

1234567891011121314151617181920
  1. """Tests for Virtual Printer FTP server port configuration."""
  2. from backend.app.services.virtual_printer.ftp_server import FTP_PORT
  3. class TestFTPPort:
  4. """Verify FTP server uses the standard FTPS port."""
  5. def test_ftp_port_is_990(self):
  6. """FTP must bind to port 990 (standard implicit FTPS).
  7. Port 9990 required an iptables REDIRECT rule which rewrites
  8. the destination IP to the interface's primary address, breaking
  9. multi-VP setups with different bind IPs and access codes.
  10. """
  11. assert FTP_PORT == 990, (
  12. f"FTP_PORT must be 990 (standard FTPS), not {FTP_PORT}. "
  13. "Using a non-standard port requires iptables REDIRECT which "
  14. "breaks multi-VP setups."
  15. )