Skip to content

Commit d0edddb

Browse files
committed
Move acceptance tests to .test
Bump Java Docker image version to fix #53
1 parent 3618e4f commit d0edddb

File tree

106 files changed

+29
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+29
-12
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.goxc.local.json
2-
.vagrant
3-
.vscode/.*
2+
.test/.vagrant
3+
.vscode/.*

Vagrantfile renamed to .test/Vagrantfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
Vagrant.configure(2) do |config|
55
config.vm.box = 'ubuntu/trusty64'
6+
7+
config.vm.provider "virtualbox" do |v|
8+
v.name = "dexec-acceptance-tests"
9+
end
610

711
config.vm.provision 'bootstrap', type: 'shell', inline: <<-SHELL
812
function add_if_not_in_file() {
@@ -42,5 +46,5 @@ Vagrant.configure(2) do |config|
4246
chown -R vagrant:vagrant /home/vagrant/.go
4347
SHELL
4448

45-
config.vm.synced_folder '.', '/home/vagrant/.go/src/github.com/docker-exec/dexec'
49+
config.vm.synced_folder '..', '/home/vagrant/.go/src/github.com/docker-exec/dexec'
4650
end
Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
#!/usr/bin/env bash
22

3+
function get_cwd() {
4+
pushd $(dirname ${0}) >/dev/null
5+
script_path=$(pwd -P)
6+
popd >/dev/null
7+
echo "${script_path}"
8+
}
9+
10+
311
function get_snapshot_plugin() {
412
if ! grep -q vagrant-vbox-snapshot <(vagrant plugin list); then
513
vagrant plugin install vagrant-vbox-snapshot
@@ -37,6 +45,8 @@ function restore() {
3745
}
3846

3947
function run() {
48+
local cwd="$(get_cwd)"
49+
pushd "${cwd}" >/dev/null
4050
up
4151
if [ -z "$1" ] || [ "$1" != "--no-clean" ]; then
4252
echo "Restoring to initial state"
@@ -48,15 +58,16 @@ function run() {
4858
cd /home/vagrant/.go/src/github.com/docker-exec/dexec
4959
go get
5060
go install
51-
bats .bats/dexec.bats"
61+
bats .test/bats/dexec.bats"
5262
down
63+
popd >/dev/null
5364
}
5465

5566
case $1 in
5667
run)
5768
run $2;;
5869
*)
5970
echo "Usage:"
60-
echo " ./acceptance-tests.sh run [--no-clean]"
71+
echo " .test/acceptance-tests.sh run [--no-clean]"
6172
;;
6273
esac
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ function run_standard_tests() {
7575
}
7676

7777
@test "java" {
78-
skip
7978
run_standard_tests $BATS_TEST_DESCRIPTION
8079
}
8180

0 commit comments

Comments
 (0)