From b4205dda0bf1a7e00b35e8a92bc433f6b2fd2b71 Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Thu, 4 Apr 2024 09:39:35 -0400 Subject: [PATCH] 21583: Add test for base64 gem lock Arvados-DCO-1.1-Signed-off-by: Brett Smith --- .../api/test/integration/gemfile_lock_test.rb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 services/api/test/integration/gemfile_lock_test.rb diff --git a/services/api/test/integration/gemfile_lock_test.rb b/services/api/test/integration/gemfile_lock_test.rb new file mode 100644 index 0000000000..2128c105cd --- /dev/null +++ b/services/api/test/integration/gemfile_lock_test.rb @@ -0,0 +1,20 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + +require 'test_helper' + +class GemfileLockTest < ActionDispatch::IntegrationTest + # Like the assertion message says, refer to Gemfile for this test's + # rationale. This test can go away once we start supporting Ruby 3.4+. + test "base64 gem is not locked to a specific version" do + gemfile_lock_path = Rails.root.join("Gemfile.lock") + File.open(gemfile_lock_path) do |f| + assert_equal( + f.each_line.any?(/^\s*base64\s+\(/), + false, + "Gemfile.lock includes a specific version of base64 - revert and refer to the comments in Gemfile", + ) + end + end +end -- 2.30.2