Skip to content

Commit

Permalink
Add int test that sets non english LANG
Browse files Browse the repository at this point in the history
  • Loading branch information
kokesak committed Dec 7, 2021
1 parent 9c99433 commit 2ed08cd
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
14 changes: 14 additions & 0 deletions plans/tier1.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,17 @@ discover+:
- name: reboot machine
how: ansible
playbook: tests/ansible_collections/reboot.yml

/language_test:
discover+:
test: checks-after-conversion
prepare+:
- name: set non english locale
how: shell
script: pytest -svv tests/integration/tier1/set-locale/use_non_english_language.py
- name: main conversion preparation
how: shell
script: pytest -svv tests/integration/tier1/method/activation_key.py
- name: reboot machine
how: ansible
playbook: tests/ansible_collections/reboot.yml
Binary file not shown.
17 changes: 17 additions & 0 deletions tests/integration/tier1/set-locale/use_non_english_language.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import platform


def test_use_non_english_language(shell):
"""
We need to test the ability of convert2rhel to convert the system when non english
language is set (using non ascii language).
Ref bug: https://bugzilla.redhat.com/show_bug.cgi?id=2022854
"""
# install Chinese language pack for CentOS-8 and Oracle Linux 8
os = platform.platform()
if os.find("centos-8") != -1 or os.find("oracle-8") != -1:
assert shell("dnf install glibc-langpack-zh -y").returncode == 0

# set LANG to Chinese
assert shell("localectl list-locales | grep zh_CN.utf8").returncode == 0
assert shell("localectl set-locale LANG=zh_CN.utf8").returncode == 0

0 comments on commit 2ed08cd

Please sign in to comment.