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

Fix pkg.latest integration test for non-LTS ubuntu #34518

Merged
merged 1 commit into from
Jul 7, 2016

Commits on Jul 7, 2016

  1. Fix pkg.latest integration test for non-LTS ubuntu

    This test uses ``pkg.list_upgrades`` to find a package which it assumes is
    installed, to test ``pkg.installed`` with ``only_upgrade=True``. The
    problem with that approach is that ``pkg.list_upgrades`` uses a dry-run
    of an ``apt-get dist-upgrade`` to find the upgrades. On non-LTS Ubuntu
    releases, a ``dist-upgrade`` results in upgrading to an entirely new
    Ubuntu release, and new packages which would be installed by the
    dist-upgrade (but are not currently installed) will be included in the
    return data. This causes the test to fail when we attempt to run
    ``pkg.latest`` with ``only_upgrade=True`` on a package which is not
    already installed.
    
    This commit fixes the test by ensuring that our target package is
    already installed, and continuing to iterate through the return data
    from ``pkg.list_upgrades`` until a currently-installed package is found.
    terminalmage committed Jul 7, 2016
    Configuration menu
    Copy the full SHA
    4aef44e View commit details
    Browse the repository at this point in the history