freeipa/ipatests/test_integration/test_upgrade.py
Tibor Dudlák 89799a14ce Add assert to check output of upgrade
Ckeck the output of ipa-server-upgrade script for error.

Related to: https://pagure.io/freeipa/issue/7644

Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2018-08-16 12:45:00 +02:00

24 lines
731 B
Python

#
# Copyright (C) 2018 FreeIPA Contributors see COPYING for license
#
"""
Module provides tests to verify that the upgrade script works.
"""
from ipatests.test_integration.base import IntegrationTest
from ipatests.pytest_ipa.integration import tasks
class TestUpgrade(IntegrationTest):
@classmethod
def install(cls, mh):
tasks.install_master(cls.master, setup_dns=False)
def test_invoke_upgrader(self):
cmd = self.master.run_command(['ipa-server-upgrade'],
raiseonerr=False)
assert ("DN: cn=Schema Compatibility,cn=plugins,cn=config does not \
exists or haven't been updated" not in cmd.stdout_text)
assert cmd.returncode == 0