f0edbff6f2
Several existing tests patch os.path.exists() to return a given value, whilst avoiding interfering with other checks for path existence inside the test virtualenv. Currently they do it by duplicating logic. Furthermore, in the near future, more tests (specifically, some SEV functional tests) will want to do the same selective patching, and similarly will need to avoid impacting existence checks on other files within the test virtualenv, e.g. placement-policy.yaml. TestGuestConfigSysinfoSerialOS already had a nice patch_exists() context manager for selectively patching os.path.exists based on the path parameter, so move this to nova.test.TestCase so that it can be reused to reduce duplication, and add appropriate unit test cases. In order to make patch_exists() generic, the path has to be introduced as an extra parameter alongside the desired return value. Additionally make it usable as a decorator, not just a context manager. This is achievable natively in Python 3 with contextlib, and in Python 2 via contextlib2. Change-Id: Ibe7cb29620f06d31059f2a5f94ca180b8671046e
32 lines
1010 B
Plaintext
32 lines
1010 B
Plaintext
# The order of packages is significant, because pip processes them in the order
|
|
# of appearance. Changing the order has an impact on the overall integration
|
|
# process, which may cause wedges in the gate later.
|
|
|
|
hacking>=1.1.0,<1.2.0 # Apache-2.0
|
|
contextlib2>=0.5.5;python_version<'3.0' # PSF License
|
|
coverage!=4.4,>=4.0 # Apache-2.0
|
|
ddt>=1.0.1 # MIT
|
|
fixtures>=3.0.0 # Apache-2.0/BSD
|
|
mock>=2.0.0 # BSD
|
|
mox3>=0.20.0 # Apache-2.0
|
|
psycopg2>=2.7 # LGPL/ZPL
|
|
PyMySQL>=0.7.6 # MIT License
|
|
pycodestyle>=2.0.0 # MIT License
|
|
python-barbicanclient>=4.5.2 # Apache-2.0
|
|
python-ironicclient>=2.7.0 # Apache-2.0
|
|
requests-mock>=1.2.0 # Apache-2.0
|
|
oslotest>=3.2.0 # Apache-2.0
|
|
stestr>=1.0.0 # Apache-2.0
|
|
osprofiler>=1.4.0 # Apache-2.0
|
|
testresources>=2.0.0 # Apache-2.0/BSD
|
|
testscenarios>=0.4 # Apache-2.0/BSD
|
|
testtools>=2.2.0 # MIT
|
|
bandit>=1.1.0 # Apache-2.0
|
|
gabbi>=1.35.0 # Apache-2.0
|
|
|
|
# vmwareapi driver specific dependencies
|
|
oslo.vmware>=2.17.0 # Apache-2.0
|
|
|
|
# placement functional tests
|
|
wsgi-intercept>=1.7.0 # MIT License
|