README.md in embulk-output-ftp-0.2.0 vs README.md in embulk-output-ftp-0.2.1
- old
+ new
@@ -115,35 +115,44 @@
$ ./gradlew gem # -t to watch change of files and rebuild continuously
```
## Test
-```
+Firstly install Docker and Docker compose then `docker-compose up -d`,
+so that an FTP server will be locally launched then you can run tests with `./gradlew test`.
+
+```sh
+$ docker-compose up -d
+Creating network "embulk-output-ftp_default" with the default driver
+Creating embulk-output-ftp_server ... done
+Creating embulk-output-ftps_server ... done
+
+$ docker-compose ps
+ Name Command State Ports
+---------------------------------------------------------------------------------------------------
+embulk-output-ftp_server /usr/sbin/run-vsftpd.sh Up 20/tcp, 0.0.0.0:11021->21/tcp, 0.0.0.0:65000->65000/tcp, 0.0.0.0:65001->65001/tcp, 0.0.0.0:65002->65002/tcp, 0.0.0.0:65003->65003/tcp,
+ 0.0.0.0:65004->65004/tcp
+embulk-output-ftps_server /usr/sbin/run-vsftpd-with- ... Up 20/tcp, 0.0.0.0:990->21/tcp, 0.0.0.0:65005->65005/tcp, 0.0.0.0:65006->65006/tcp, 0.0.0.0:65007->65007/tcp, 0.0.0.0:65008->65008/tcp
+
$ ./gradlew test # -t to watch change of files and rebuild continuously
```
-To run unit tests, we need to configure the following environment variables.
+If you want to use other FTP server to test, configure the following environment variables.
-When environment variables are not set, skip some test cases.
-
```
-FTP_TEST_HOST
-FTP_TEST_USER
-FTP_TEST_PASSWORD
+FTP_TEST_HOST (default: localhost)
+FTP_TEST_PORT (default: 11021)
+FTP_TEST_SSL_PORT (default:990)
+FTP_TEST_USER (default: scott)
+FTP_TEST_PASSWORD (default: tigger)
FTP_TEST_SSL_TRUSTED_CA_CERT_FILE
FTP_TEST_SSL_TRUSTED_CA_CERT_DATA
```
-Following option is optional
-```
-FTP_TEST_PORT (default:21)
-FTP_TEST_SSL__PORT (default:990)
-```
-
If you're using Mac OS X El Capitan and GUI Applications(IDE), like as follows.
```xml
-launchctl setenv FTP_TEST_SSL_TRUSTED_CA_CERT_FILE$ vi ~/Library/LaunchAgents/environment.plist
+$ vi ~/Library/LaunchAgents/environment.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>