From 996368201f1f2f2aaf8bf9b03bf3fabcb1ea5d4c Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 17 Jan 2016 21:06:21 -0500 Subject: [PATCH 1/4] Add vagrant setup for local testing --- .gitignore | 1 + Vagrantfile | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 Vagrantfile diff --git a/.gitignore b/.gitignore index a722348..266ef35 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ tests/dokku tests/fixtures tests/bin/plugn +.vagrant diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..21efd2a --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,30 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +BOX_NAME = ENV["BOX_NAME"] || "bento/ubuntu-14.04" +BOX_MEMORY = ENV["BOX_MEMORY"] || "512" +DOKKU_VERSION = "master" + +Vagrant.configure(2) do |config| + config.vm.box = BOX_NAME + config.ssh.forward_agent = true + + config.vm.provider :virtualbox do |vb| + # Ubuntu's Raring 64-bit cloud image is set to a 32-bit Ubuntu OS type by + # default in Virtualbox and thus will not boot. Manually override that. + vb.customize ["modifyvm", :id, "--ostype", "Ubuntu_64"] + vb.customize ["modifyvm", :id, "--memory", BOX_MEMORY] + end + + config.vm.provider :vmware_fusion do |v, override| + v.vmx["memsize"] = BOX_MEMORY + end + + config.vm.define "default", primary: true do |vm| + vm.vm.synced_folder File.dirname(__FILE__), "/vagrant" + + vm.vm.provision :shell, :inline => "apt-get update > /dev/null && apt-get install -y -qq git software-properties-common" + vm.vm.provision :shell, :inline => "cd /vagrant && DOKKU_VERSION=#{DOKKU_VERSION} make setup" + vm.vm.provision :shell, :inline => "cd /vagrant && DOKKU_TRACE=1 DOKKU_VERSION=#{DOKKU_VERSION} make test" + end +end From 06ff6c013fe6715c97d104fd934250903ee00195 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 17 Jan 2016 21:06:45 -0500 Subject: [PATCH 2/4] Upgrade plugn --- tests/test_helper.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_helper.bash b/tests/test_helper.bash index ca11222..24a3de4 100644 --- a/tests/test_helper.bash +++ b/tests/test_helper.bash @@ -10,7 +10,7 @@ export PLUGIN_AVAILABLE_PATH="$PLUGIN_PATH" export PLUGIN_CORE_AVAILABLE_PATH="$PLUGIN_PATH" export REDIS_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/fixtures" export PLUGIN_DATA_ROOT="$REDIS_ROOT" -export PLUGN_URL="https://github.com/progrium/plugn/releases/download/v0.1.0/plugn_0.1.0_linux_x86_64.tgz" +export PLUGN_URL="https://github.com/dokku/plugn/releases/download/v0.2.1/plugn_0.2.1_linux_x86_64.tgz" mkdir -p "$PLUGIN_DATA_ROOT" rm -rf "${PLUGIN_DATA_ROOT:?}"/* From bda3ad2c109a7c802ae0f92f7e516e7320be6202 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 17 Jan 2016 21:07:00 -0500 Subject: [PATCH 3/4] Remove invalid service directory during command runs Refs dokku/dokku-mariadb#30 --- commands | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commands b/commands index 902edcd..71aea8e 100755 --- a/commands +++ b/commands @@ -15,6 +15,10 @@ if [[ $1 == $PLUGIN_COMMAND_PREFIX:* ]]; then fi fi +if [[ -d "$PLUGIN_DATA_ROOT/*" ]]; then + rm -rf "$PLUGIN_DATA_ROOT/*" +fi + case "$1" in $PLUGIN_COMMAND_PREFIX:create) [[ -z $2 ]] && dokku_log_fail "Please specify a name for the service" From b8c3312ae77c2b8b177d18be49566f0e00a8f450 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 17 Jan 2016 21:08:06 -0500 Subject: [PATCH 4/4] Upgrade testing environment to trusty --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 1ee4a8e..c08f6d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ sudo: required +dist: trusty language: bash env: - DOKKU_VERSION=master