Project

General

Profile

Bug #10359

Force UTF-8 locale in automated test suite

Added by anonym over 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Test suite
Target version:
Start date:
10/12/2015
Due date:
% Done:

100%

Feature Branch:
test/10359-force-utf-8
Type of work:
Code
Blueprint:
Starter:
Affected tool:

Description

In the 'the Unsafe Browser works in all supported languages' step we read config/chroot_local-includes/usr/share/tails/browser-localization/descriptions from our Git. It contains some UTF-8 => non-ASCII characters, so if the system locale is non-UTF-8 (e.g. POSIX) then we get this error when we try to operate on it (split() in this case):

Then the Unsafe Browser works in all supported languages                   # features/step_definitions/unsafe_browser.rb:25
  invalid byte sequence in US-ASCII (ArgumentError)
  ./features/step_definitions/unsafe_browser.rb:8:in `split'
[...]

We should force UTF-8, which can be done with:
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8

Associated revisions

Revision 50c660cb (diff)
Added by anonym over 4 years ago

Force Ruby to use UTF-8 in the automated test suite.

Ruby will default to the system locale, and if it is non-UTF-8,
String-methods will fail when operating on non-ASCII strings.

Will-fix: #10359

History

#1 Updated by anonym over 4 years ago

  • Status changed from Confirmed to In Progress

Applied in changeset commit:de75bc1604d6478325f69f922a2cd902055771be.

#2 Updated by anonym over 4 years ago

  • Assignee changed from anonym to bertagaz
  • QA Check set to Ready for QA
  • Feature Branch set to test/10359-force-utf-8

This will hopefully fix the issue on tailstester1.

#3 Updated by anonym over 4 years ago

#4 Updated by bertagaz over 4 years ago

  • Status changed from In Progress to 11
  • Assignee deleted (bertagaz)
  • % Done changed from 0 to 100
  • QA Check changed from Ready for QA to Pass

I've merged this branch after testing it locally.

#5 Updated by anonym about 4 years ago

  • Status changed from 11 to Resolved

Also available in: Atom PDF