Browse Source

Add some tests for bundler finding binstubs

David Rodríguez 6 years ago
parent
commit
018d95b27c

+ 1 - 0
test/config.sh

@@ -225,6 +225,7 @@ imageTests+=(
 		ruby-gems
 		ruby-bundler
 		ruby-nonroot
+		ruby-binstubs
 	'
 	[rust]='
 		rust-hello-world

+ 3 - 0
test/tests/ruby-binstubs/Gemfile

@@ -0,0 +1,3 @@
+source 'https://rubygems.org'
+gem 'bundler-audit'
+gem 'brakeman'

+ 13 - 0
test/tests/ruby-binstubs/container.sh

@@ -0,0 +1,13 @@
+#!/bin/sh
+set -e
+
+dir="$(mktemp -d)"
+trap "rm -rf '$dir'" EXIT
+
+cp Gemfile "$dir"
+
+cd "$dir"
+
+gem install bundler -v "$1"
+bundle install
+bundle audit version

+ 8 - 0
test/tests/ruby-binstubs/run.sh

@@ -0,0 +1,8 @@
+#!/bin/bash
+set -eo pipefail
+
+testDir="$(readlink -f "$(dirname "$BASH_SOURCE")")"
+runDir="$(dirname "$testDir")"
+
+"$runDir/run-in-container.sh" "$testDir" "$1" sh ./container.sh 2.0.2
+"$runDir/run-in-container.sh" "$testDir" "$1" sh ./container.sh 2.1.1