21583: Add test for base64 gem lock 21583-railsapi-base64-gem
authorBrett Smith <brett.smith@curii.com>
Thu, 4 Apr 2024 13:39:35 +0000 (09:39 -0400)
committerBrett Smith <brett.smith@curii.com>
Thu, 4 Apr 2024 13:39:35 +0000 (09:39 -0400)
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>

services/api/test/integration/gemfile_lock_test.rb [new file with mode: 0644]

diff --git a/services/api/test/integration/gemfile_lock_test.rb b/services/api/test/integration/gemfile_lock_test.rb
new file mode 100644 (file)
index 0000000..2128c10
--- /dev/null
@@ -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