nova/nova
melanie witt 87dba379ac Make test_archive_task_logs deterministic
The 'nova-manage db archive_deleted_rows --task-log' functional tests
involve manipulating time to assert archive behaviors when the --before
flag is also used.

While timedelta was used, set_time_override was not, so depending on
the date the test ran on + the number of days in the current month and
next two months, the test could fail. Task log audit periods are one
calendar month by default and the compute manager calls
last_completed_audit_period() without specifying a unit.

This changes the tests to use a time override to ensure predictable
behavior with regard to the audit period boundaries. The tests were
moved into their own test case classes in order to override the time
before services were started, so that the "service up" calculations
work as expected.

Closes-Bug: #1934519

Change-Id: I9b16a3a849937aba5b90ed1ab9a80b7f0103f673
2021-07-09 22:40:11 +00:00
..
accelerator Remove six.text_type (1/2) 2020-12-13 11:25:31 +00:00
api api: Handle invalid volume UUIDs during spawn 2021-07-07 14:28:02 +01:00
cmd Merge "Add --task-log option to nova-manage db archive_deleted_rows" 2021-06-18 11:54:56 +00:00
compute db: Remove 'nova.db.base' module 2021-06-16 10:10:29 +01:00
conductor db: Remove 'nova.db.base' module 2021-06-16 10:10:29 +01:00
conf Use the new type HostDomainOpt. 2021-05-19 10:29:56 +02:00
console Reject open redirection in the console proxy 2021-05-14 17:26:00 +02:00
db Merge "db: Clean up migration code" 2021-07-03 05:23:37 +00:00
hacking Add a hacking rule for assert_has_calls 2020-09-28 23:08:15 +09:00
image glance: Remove [glance]/allowed_direct_url_schemes 2021-01-28 12:46:57 +00:00
keymgr
locale Imported Translations from Zanata 2020-04-26 07:51:21 +00:00
network db: Remove 'nova.db.base' module 2021-06-16 10:10:29 +01:00
notifications Remove (almost) all references to 'instance_type' 2021-03-29 12:24:15 +01:00
objects Fix max cpu topologies with numa affinity 2021-06-18 12:34:22 +01:00
pci mypy: Add type annotations to 'nova.pci' 2021-04-26 18:06:21 +01:00
policies Fix oslo policy DeprecatedRule warnings 2021-07-04 16:00:55 -05:00
privsep Retry lvm volume and volume group query 2021-06-15 12:39:26 +02:00
scheduler Merge "Remove (almost) all references to 'instance_type'" 2021-06-13 05:57:49 +00:00
servicegroup Remove six.binary_type/integer_types/string_types 2020-12-13 11:25:14 +00:00
storage Stop leaking ceph df cmd in RBD utils 2021-05-11 17:28:56 +02:00
tests Make test_archive_task_logs deterministic 2021-07-09 22:40:11 +00:00
virt [ironic] Minimize window for a resource provider to be lost 2021-07-02 13:02:02 -07:00
volume Remove six.text_type (1/2) 2020-12-13 11:25:31 +00:00
__init__.py
availability_zones.py Remove six.PY2 and six.PY3 2020-08-15 07:45:23 +00:00
baserpc.py
block_device.py virt: Remove 'is_xenapi' helper 2020-09-11 14:09:06 +01:00
cache_utils.py trivial: Remove unused 'cache_utils' APIs 2020-02-05 17:20:28 +00:00
config.py Fix config option default value for sample config file 2020-11-25 00:05:08 +00:00
context.py Remove six.binary_type/integer_types/string_types 2020-12-13 11:25:14 +00:00
crypto.py Replace md5 for fips 2021-02-25 16:01:43 -05:00
debugger.py trivial: Remove remaining '_LW' instances 2020-05-18 17:00:41 +01:00
exception.py db: Remove 'nova.db.sqlalchemy.utils' 2021-06-16 10:10:29 +01:00
exception_wrapper.py rpc: Rework 'get_notifier', 'wrap_exception' 2021-03-01 11:06:48 +00:00
filters.py trivial: Remove remaining '_LI' instances 2020-05-18 17:00:57 +01:00
i18n.py trivial: Remove remaining '_LI' instances 2020-05-18 17:00:57 +01:00
loadables.py trivial: Remove dead code 2019-12-12 10:55:02 +00:00
manager.py db: Remove 'nova.db.base' module 2021-06-16 10:10:29 +01:00
middleware.py Allow X-OpenStack-Nova-API-Version header in CORS 2021-06-15 07:35:36 -04:00
monkey_patch.py Correctly disable greendns 2020-09-11 12:42:04 -04:00
policy.py Reuse code from oslo lib for JSON policy migration 2021-01-14 22:41:33 +00:00
profiler.py
quota.py Make quotas respect instance_list_per_project_cells 2020-05-15 17:21:29 -04:00
rpc.py rpc: Rework 'get_notifier', 'wrap_exception' 2021-03-01 11:06:48 +00:00
safe_utils.py
service.py Restore retrying the RPC connection to conductor 2020-11-13 18:02:00 +01:00
service_auth.py
test.py Make test_archive_task_logs deterministic 2021-07-09 22:40:11 +00:00
utils.py Replace getargspec with getfullargspec 2021-05-12 10:50:52 +08:00
version.py Change API unexpected exception message 2021-02-17 21:30:07 +00:00
weights.py Remove six.add_metaclass 2020-08-15 07:45:39 +00:00
wsgi.py trivial: Remove remaining '_LI' instances 2020-05-18 17:00:57 +01:00