CI: Remove no longer necessary package installs
Installation of packages on every execution of a test suffers from any upstream flakiness. Therefore installation of generic packages is being moved to the underlying OS, in this case the AMI being used for the CCP job. In place of outright removing the package installation, it is a much better pattern to instead replace installation with a validation of the assumptions made for packages installed on the underlying OS the test will run within. The call `yum --cacheonly list installed [List of Packages]` does a number of things: 1. For the given list of packages, if installed the command will return 0, and if any are not installed will return 1 2. The `--cacheonly` prevents the call from issuing an upstream repository metadata refresh. This is not a requirement, but is an easy optimization that avoids upstream flakiness even further. Note: `--cacheonly` assumes that the repostiroy metadata cache has been refresh atleast once. If not, the flag will cause the command to fail. We are assuming that it has been performed at least once in the underlying OS in order to install the packages in the first place. Signed-off-by: NAlexandra Wang <lewang@pivotal.io> Signed-off-by: NDivya Bhargov <dbhargov@pivotal.io>
Showing
想要评论请 注册 或 登录