浏览代码

Merge pull request #7166 from deivid-rodriguez/add_tests_for_bundler_finding_binstubs

Add some tests for bundler finding binstubs
Tianon Gravi 6 年之前
父节点
当前提交
a774698fc9
共有 4 个文件被更改,包括 25 次插入0 次删除
  1. 1 0
      test/config.sh
  2. 3 0
      test/tests/ruby-binstubs/Gemfile
  3. 13 0
      test/tests/ruby-binstubs/container.sh
  4. 8 0
      test/tests/ruby-binstubs/run.sh

+ 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