diff --git a/.expeditor/buildkite/verify.sh b/.expeditor/buildkite/verify.sh index 01982b79..d55ec1e5 100755 --- a/.expeditor/buildkite/verify.sh +++ b/.expeditor/buildkite/verify.sh @@ -7,6 +7,7 @@ bundle --version echo "--- bundle install" bundle config --local path vendor/bundle +bundle config --local without integration tools bundle install --jobs=7 --retry=3 echo "+++ bundle exec rake" diff --git a/Gemfile b/Gemfile index cb846477..f4f355c9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,11 +1,6 @@ source "https://rubygems.org" gemspec name: "train" -if Gem.ruby_version.to_s.start_with?("2.5") - # 16.7.23 required ruby 2.6+ - gem "chef-utils", "< 16.7.23" # TODO: remove when we drop ruby 2.5 -end - group :test do gem "minitest", "~> 5.8" gem "rake", "~> 13.0" @@ -20,7 +15,9 @@ group :test do # but it's close enough to show the gempath handler can find a plugin # See test/unit/ gem "train-test-fixture", path: "test/fixtures/plugins/train-test-fixture" - gem "mocha", "~> 1.1" + # Mocha ~1.1 is incompatible with minitest v5.19 and later + # More on the issue: https://github.com/freerange/mocha/issues/614 + gem "mocha", "~> 2" end if Gem.ruby_version >= Gem::Version.new("2.7.0") diff --git a/test/unit/transports/ssh_test.rb b/test/unit/transports/ssh_test.rb index 0d095f9d..51917416 100644 --- a/test/unit/transports/ssh_test.rb +++ b/test/unit/transports/ssh_test.rb @@ -215,7 +215,8 @@ end it "sets up a proxy when ssh proxy command is specified" do - mock = MiniTest::Mock.new + mock = Minitest::Mock.new + mock.expect(:call, true) do |hostname, username, options| options[:proxy].is_a?(Net::SSH::Proxy::Command) && "ssh root@127.0.0.1 -W %h:%p" == options[:proxy].command_line_template @@ -384,7 +385,7 @@ end it "sets up a proxy when ssh proxy command is specified" do - mock = MiniTest::Mock.new + mock = Minitest::Mock.new mock.expect(:call, true) do |hostname, username, options| options[:proxy].is_a?(Net::SSH::Proxy::Command) && "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR -o ForwardAgent=no -o IdentitiesOnly=yes -i #{conf[:key_files]} root@bastion_dummy -p 22 -W %h:%p" == options[:proxy].command_line_template