Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add int test that sets non english LANG #387

Merged
merged 1 commit into from
Dec 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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