diff --git a/tests/integration/files/file/base/pkg_latest_epoch.sls b/tests/integration/files/file/base/pkg_latest_epoch.sls index 5bfe107bd9..a9a80af8a5 100644 --- a/tests/integration/files/file/base/pkg_latest_epoch.sls +++ b/tests/integration/files/file/base/pkg_latest_epoch.sls @@ -1,3 +1,3 @@ nova_packages: pkg.latest: - - name: libguestfs-tools + - name: bash-completion diff --git a/tests/integration/states/pkg.py b/tests/integration/states/pkg.py index 118f9ac2c7..c4b7513d26 100644 --- a/tests/integration/states/pkg.py +++ b/tests/integration/states/pkg.py @@ -46,7 +46,7 @@ _PKG_TARGETS_DOT = { } -@requires_salt_modules('pkg.version', 'pkg.latest_version') +@requires_salt_modules('pkg.version', 'pkg.latest_version', 'pkg.info_installed') class PkgTest(integration.ModuleCase, integration.SaltReturnAssertsMixIn): ''' @@ -293,9 +293,17 @@ class PkgTest(integration.ModuleCase, This is a destructive test as it installs a package ''' + package = 'bash-completion' + pkgquery = 'version' + ret = self.run_function('state.sls', mods='pkg_latest_epoch') self.assertSaltTrueReturn(ret) + #After the pkg has been installed by the sls file above we + #need to verify that it actually installed + ret = self.run_function('pkg.info_installed', [package]) + self.assertTrue(pkgquery in str(ret)) + if __name__ == '__main__': from integration import run_tests run_tests(PkgTest)