Skip to content

Commit 25da797

Browse files
committed
SLES 15 fixes
Prior to this commit acceptance tests for SLES 15 were failing. This was caused by a charset mismatch. This commit fixes the issue by extending the `fetch_charset` method so that it returns `utf8mb3` when the current OS is SLES 15.
1 parent 8856833 commit 25da797

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

spec/spec_helper_acceptance_local.rb

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,16 @@ def export_locales
3232
LitmusHelper.instance.run_shell('. ~/.bashrc')
3333
end
3434

35+
def ubuntu_2204?
36+
os[:family] == 'ubuntu' && os[:release].to_f == 22.04
37+
end
38+
39+
def sles_15?
40+
os[:family] == 'sles' && os[:release].to_i == 15
41+
end
42+
3543
def fetch_charset
36-
@charset ||= if os[:family] == 'ubuntu' && os[:release] =~ %r{^22\.04}
37-
'utf8mb3'
38-
else
39-
'utf8'
40-
end
44+
@charset ||= ubuntu_2204? || sles_15? ? 'utf8mb3' : 'utf8'
4145
end
4246

4347
RSpec.configure do |c|

0 commit comments

Comments
 (0)