Using the OSX FTP server turned out brittle in the Travis environment.
The test directory now contains vsftpd binaries for Linux and OSX
environments and a common configuration file. You can save your own
versions of vsftpd.conf ad vsftpd-*.conf which is now listed in the
.gitignore file.
Starting the FTP server as unprivileged user needed a change of the FTP
port. The test script has been adapted accordingly.
A change in behaviour of some OSX command line tools with the filesystem
in OSX also required some changes.
Installing lftp via homebrew became brittle as well. And it took time.
The tests directory now comes with an lftp pkg file.
The function urlencode failed to encode umlaut characters on Bash 3. But
curl tries to handle the encoding already. So let curl encode
filenames. The # character is still encoded, because it would cut the
filename (seen as a comment).
Invoking the test suite like this caused errors:
GIT_FTP_USER=ftp GIT_FTP_PASSWD=ftp GIT_FTP_ROOT=localhost/test ./tests/git-ftp-test.sh
The GIT_FTP_ROOT required a trailing slash. That is changed by this
commit.
That slash isn't required any more. If it's added, the path will contain
two slashes which isn't a problem. I don't see a point in adding code
for canonicalising the path in the test suite.
Travis (http://travis-ci.org/) provides free integration testing hooked
into GitHub. Writing this config file (.travis.yml) is the most
difficult part in setting it up. There are only three steps left:
1. Sign into Travis with your GitHub account
2. Activate GitHub webhook for this project
3. Merge this pull request
Only one test will fail unless pull request #136 got merged.