Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[1LP][RFR] Fix minor version update tests. #8521

Merged
merged 36 commits into from
Aug 5, 2019
Merged

[1LP][RFR] Fix minor version update tests. #8521

merged 36 commits into from
Aug 5, 2019

Conversation

jarovo
Copy link
Contributor

@jarovo jarovo commented Feb 28, 2019

In general this PR makes minor version update tests working.

Note for 2LP: It is probably futile, but would prefer to not squash the commits on approve to keep the track of what line changed for what reason.

  • fix picking a version previous of the current one for the update
  • In replicated environment, we can have two masters. In such case one of
    them (possibly incorrect one) was selected by the tests. This PR
    tries to select the the correct rest-api object matching the appliance
    in the context.
  • make some update tests use the correct appliance (as using the default one was wrong)
  • fixes related to browser stealing when tests have to use multiple appliances using the web ui.
  • fixes related to wait_for when checking in login page

This needs #8749

Tested already with: py.test: -v cfme/tests/cli/test_appliance_update.py
{{ py.test: -v cfme/tests/generic_objects/test_instances.py }}

@jarovo jarovo changed the title Fix minor version update tests. [RFR] Fix minor version update tests. Feb 28, 2019
@dajoRH dajoRH added the lint-ok label Feb 28, 2019
@lina-is-here
Copy link
Contributor

@JaryN Please check PRT failures

Jaroslav Henner added 28 commits August 2, 2019 16:19
The repo file (for example
http://file.cloudforms.lab.eng.rdu2.redhat.com/builds/cfme/5.10/5.10.3.1/packages.repo
) contains link to baseurl with dir `latest`. But not every time we have
picked the latest package.repo. In such case the package refered in
`latest` dir will not be the intended one and it is better to detect
that. This patch adds a method for checking the version of cfme the
packages.repo in the end ponts at.
After the db migration and evm restart of the
   cfme/tests/test_db_migrate.py::test_db_migrate_replication[57]
and other tests with similar pattern, the login page is not fully loaded
immediately and needs some time to display all the components. If not
waited for, the test dies with: Exception: Could not open the login screen.

Adding simple wait_for helps to wait until the login page load.
This should help with test_update_ha_webui
This is fixing

    @Property
    def is_dedicated_active(self):
        result = self.appliance.ssh_client.run_command(
            "systemctl status {}-postgresql.service | grep running".format(
>               self.postgres_version))
E       AttributeError: 'ApplianceDB' object has no attribute 'postgres_version'
@jawatts
Copy link
Contributor

jawatts commented Aug 5, 2019

Test fixes will be addressed in a different PR.

@jawatts jawatts merged commit e4df814 into ManageIQ:master Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants