curl-and-python

Re: Test suite dependencies

From: Oleg Pudeyev <oleg+pycurl_at_bsdpower.com>
Date: Sun, 3 Mar 2013 05:39:58 -0500

On Sat, 2 Mar 2013 21:13:52 -0500
Oleg Pudeyev <oleg+pycurl_at_bsdpower.com> wrote:

> On Fri, 1 Mar 2013 10:40:58 +0200
> Michael Wood <esiotrot_at_gmail.com> wrote:
>
> >
> > I'm not sure if it makes sense to use it, but of course libcurl's
> > test suite has a test server.
> >
>
> This is interesting especially if it supports protocols other than
> HTTP, as has been pointed out. I have not been able to immediately
> locate documentation for it, do you know if any exists?
>

I actually investigated this today for the ftp test.

Starting point:
https://github.com/p/pycurl/blob/master/tests/test_ftp.py

Converted to unittest:
https://github.com/p/pycurl/blob/python3/tests/ftp_test.py

I found ftpserver.pl in curl test suite and tried it. Unfortunately it
appears to not implement any sort of directory browsing (regardless of
directory changes it returns the same content when listing files) and
so far I have not been able to figure out what command I could give it
to obtain a different output from it. As a result, test_quote is
presently identical to test_get_ftp.

My current plan with respect to this conundrum is to use something like
vsftpd. The requirements would be:

1. Ability to launch the server process fairly easily. In order of
precedence: giving all arguments on command line is best, followed by a
single configuration file, followed by multiple configuration files,
hopefully not getting to stuff that requires changes to operating
system (freebsd's ftpd insists that I create a `ftp` system user to
provide anonymous ftp).
2. Ability to launch server process without daemonizing it (something
freebsd ftpd appears to be also incapable of).
3. As few dependencies of its own as possible.
4. Good security history.

Expanding curl's ftpserver functionality might be a better long-term
plan, but right now I think this would take too much of my time to do.

Oleg
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2013-03-03