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

[RHELC-67] Add gnome-documents-libs to excluded packages #554

Merged
merged 3 commits into from
Aug 10, 2022
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
1 change: 1 addition & 0 deletions convert2rhel/data/7/x86_64/configs/centos-7-x86_64.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ excluded_pkgs =
mod_proxy_html
rhn*
yum-rhn-plugin
gnome-documents-libs

# List of packages that either contain repofiles or affect variables in the repofiles (e.g. $releasever).
# Delimited by any whitespace(s).
Expand Down
1 change: 1 addition & 0 deletions convert2rhel/data/7/x86_64/configs/oracle-7-x86_64.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ excluded_pkgs =
yum-plugin-ulninfo
yum-rhn-plugin
python-requests
gnome-documents-libs

# List of packages that either contain repofiles or affect variables in the repofiles (e.g. $releasever).
# The rhn-client-tools package contains repofiles on OL 7.6 and older, but when it's installed it's not possible to
Expand Down
20 changes: 19 additions & 1 deletion plans/tier1.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,29 @@ discover+:
how: ansible
playbook: tests/ansible_collections/roles/reboot/main.yml

/remove_excluded_pkgs:
/remove_excluded_pkgs_epel8:
adjust:
enabled: false
when: >
distro != centos-8
environment+:
PACKAGES: centos-backgrounds centos-gpg-keys
discover+:
test: checks-after-conversion
prepare+:
- name: main conversion preparation
how: shell
script: pytest -svv tests/integration/tier1/remove-excluded-pkgs/test_remove_excluded_pkgs.py
- name: reboot after conversion
how: ansible
playbook: tests/ansible_collections/roles/reboot/main.yml

/remove_excluded_pkgs_epel7:
adjust:
enabled: false
when: distro != oraclelinux-7 and distro != centos-7
environment+:
PACKAGES: gnome-documents-libs
discover+:
test: checks-after-conversion
prepare+:
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/tier1/remove-excluded-pkgs/main.fmf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
summary: remove-excluded-pkgs
summary: Check removal of excluded packages

tier: 1

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import os

from envparse import env


def test_remove_excluded_pkgs(shell, convert2rhel):
"""Ensure c2r removes pkgs, which specified as excluded_pkgs in config."""

excluded_pkg_1 = "centos-gpg-keys"
excluded_pkg_2 = "centos-backgrounds"

# install some of excluded packages
"""
Ensure Convert2RHEL removes packages, which are specified as excluded_pkgs in config.
Verification scenarios cover just some packages causing major issues.
Those are specified in their respective test plan (remove_excluded_pkgs_epel7 and remove_excluded_pkgs_epel8).
Packages are set as an environment variable.
"""
packages = os.environ["PACKAGES"]
assert (
shell(
f"yum install -y {excluded_pkg_1} {excluded_pkg_2}",
f"yum install -y {packages}",
).returncode
== 0
)
Expand All @@ -28,5 +31,4 @@ def test_remove_excluded_pkgs(shell, convert2rhel):
assert c2r.exitstatus == 0

# check excluded packages were really removed
assert shell(f"rpm -qi {excluded_pkg_1}").returncode == 1
assert shell(f"rpm -qi {excluded_pkg_2}").returncode == 1
assert shell(f"rpm -qi {packages}").returncode != 0