Merge pull request #32 from digineo/travis

Add Travis CI
This commit is contained in:
Julien Laffaye 2015-08-18 21:22:31 +02:00
commit c69930155d
4 changed files with 30 additions and 1 deletions

9
.travis.yml Normal file
View File

@ -0,0 +1,9 @@
language: go
go:
- 1.4.2
- tip
before_install:
- sudo mkdir --mode 0777 -p /var/ftp/incoming
- sudo apt-get install -qq vsftpd
- sudo cp $TRAVIS_BUILD_DIR/.vsftpd.conf /etc/vsftpd.conf
- sudo service vsftpd restart

13
.vsftpd.conf Normal file
View File

@ -0,0 +1,13 @@
# Used by Travis CI
listen=YES
write_enable=YES
dirmessage_enable=YES
secure_chroot_dir=/var/run/vsftpd/empty
anonymous_enable=YES
anon_root=/var/ftp
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
anon_umask=022

View File

@ -1,5 +1,7 @@
# goftp #
[![Build Status](https://travis-ci.org/jlaffaye/ftp.svg?branch=master)](https://travis-ci.org/jlaffaye/ftp)
A FTP client package for Go
## Documentation ##

View File

@ -32,6 +32,11 @@ func TestConn(t *testing.T) {
t.Error(err)
}
err = c.ChangeDir("incoming")
if err != nil {
t.Error(err)
}
data := bytes.NewBufferString(testData)
err = c.Stor("test", data)
if err != nil {
@ -88,7 +93,7 @@ func TestConn(t *testing.T) {
if err != nil {
t.Error(err)
} else {
if dir != "/"+testDir {
if dir != "/incoming/"+testDir {
t.Error("Wrong dir: " + dir)
}
}