Fix test assertion for mariadb-connector-c

This commit is contained in:
Michal Schorm 2022-03-28 13:45:01 +02:00 committed by Stepan Oksanichenko
parent 96fc885ca2
commit 8d5a3dc715
3 changed files with 34 additions and 1 deletions

2
.rubygem-mysql2.metadata Normal file
View File

@ -0,0 +1,2 @@
efae18a40b17065bff7f04732e8165d64393531c mysql2-0.5.3-tests.txz
75e6935c4d9a2b1c047d9e9b69c4c6d4c7e0faef mysql2-0.5.3.gem

View File

@ -0,0 +1,22 @@
From cca57b97ad6d1b1b985376be110b89d2b487dea6 Mon Sep 17 00:00:00 2001
From: Aaron Patterson <tenderlove@ruby-lang.org>
Date: Tue, 30 Nov 2021 12:59:43 -0800
Subject: [PATCH] fix assertion on maria
downgrade psych
---
spec/mysql2/client_spec.rb | 2 +-
diff --git a/spec/mysql2/client_spec.rb b/spec/mysql2/client_spec.rb
index 1519e0f5d..41fb834bf 100644
--- a/spec/mysql2/client_spec.rb
+++ b/spec/mysql2/client_spec.rb
@@ -573,7 +573,7 @@ def run_gc
end
expect do
@client.query("SELECT SLEEP(1)")
- end.to raise_error(Mysql2::Error, /Lost connection to MySQL server/)
+ end.to raise_error(Mysql2::Error, /Lost connection/)
if RUBY_PLATFORM !~ /mingw|mswin/
expect do

View File

@ -6,7 +6,7 @@
Name: rubygem-%{gem_name}
Version: 0.5.3
Release: 10%{?dist}
Release: 11%{?dist}
Summary: A simple, fast Mysql library for Ruby, binding to libmysql
License: MIT
URL: https://github.com/brianmario/mysql2
@ -14,6 +14,9 @@ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# git clone --no-checkout https://github.com/brianmario/mysql2.git
# cd mysql2 && git archive -v -o mysql2-0.5.3-tests.txz 0.5.3 spec/
Source1: %{gem_name}-%{version}-tests.txz
# Fix test assertion for mariadb-connector-c
# https://github.com/brianmario/mysql2/commit/cca57b97ad6d1b1b985376be110b89d2b487dea6
Patch2: rubygem-mysql2-0.5.3-fix-assertion-mariadb-connector-c.patch
# Required in lib/mysql2.rb
Requires: rubygem(bigdecimal)
@ -48,6 +51,9 @@ Documentation for %{name}
%prep
%setup -q -n %{gem_name}-%{version} -b 1
pushd %{_builddir}/spec
%patch2 -p2
popd
%build
# Create the gem as gem install only works on a gem file
@ -178,6 +184,9 @@ kill "$(cat "${MYSQL_TEST_PID_FILE}")"
%changelog
* Thu Feb 17 2022 Pavel Valena <pvalena@redhat.com> - 0.5.3-11
- Fix test assertion for mariadb-connector-c
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 0.5.3-10
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688