From f109d22425c6efe0812d9299fe731f799b812418 Mon Sep 17 00:00:00 2001 From: Julian Kornberger Date: Sun, 1 Jan 2017 20:17:40 +0100 Subject: [PATCH] Test vsftpd and proftpd in parallel Also use Ubuntu 14.04 instead of 12.04 --- .travis.yml | 14 +++++++------- .travis/prepare.sh | 18 ++++++++++++++++++ .travis/proftpd.conf | 9 +++++++++ .vsftpd.conf => .travis/vsftpd.conf | 0 4 files changed, 34 insertions(+), 7 deletions(-) create mode 100755 .travis/prepare.sh create mode 100644 .travis/proftpd.conf rename .vsftpd.conf => .travis/vsftpd.conf (100%) diff --git a/.travis.yml b/.travis.yml index 67e9951..b3a7360 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,14 @@ language: go +dist: trusty +sudo: required go: - 1.7.3 +env: + - FTP_SERVER=vsftpd + - FTP_SERVER=proftpd before_install: -- sudo mkdir --mode 0777 -p /var/ftp/incoming -- sudo apt-get update -qq -- sudo apt-get install -qq vsftpd -- sudo cp $TRAVIS_BUILD_DIR/.vsftpd.conf /etc/vsftpd.conf -- sudo service vsftpd restart +- sudo $TRAVIS_BUILD_DIR/.travis/prepare.sh "$FTP_SERVER" - sudo sysctl net.ipv6.conf.lo.disable_ipv6=0 -- go get github.com/axw/gocov/gocov - go get github.com/mattn/goveralls script: -- $GOPATH/bin/goveralls -service=travis-ci +- goveralls -v diff --git a/.travis/prepare.sh b/.travis/prepare.sh new file mode 100755 index 0000000..40970d9 --- /dev/null +++ b/.travis/prepare.sh @@ -0,0 +1,18 @@ +#!/bin/sh -e + +case "$1" in + proftpd) + mkdir -p /etc/proftpd/conf.d/ + cp $TRAVIS_BUILD_DIR/.travis/proftpd.conf /etc/proftpd/conf.d/ + ;; + vsftpd) + cp $TRAVIS_BUILD_DIR/.travis/vsftpd.conf /etc/vsftpd.conf + ;; + *) + echo "unknown software: $1" + exit 1 +esac + +mkdir --mode 0777 -p /var/ftp/incoming + +apt-get install -qq "$1" diff --git a/.travis/proftpd.conf b/.travis/proftpd.conf new file mode 100644 index 0000000..342d08f --- /dev/null +++ b/.travis/proftpd.conf @@ -0,0 +1,9 @@ + + User ftp + Group nogroup + MaxClients 2 + # We want clients to be able to login with "anonymous" as well as "ftp" + UserAlias anonymous ftp + + RequireValidShell off + diff --git a/.vsftpd.conf b/.travis/vsftpd.conf similarity index 100% rename from .vsftpd.conf rename to .travis/vsftpd.conf