Decrease overall run time when identity auth is set to v3.
This patch avoids executing time.sleep(1) in rbac_utils, when
Keystone v3 auth is enabled, which greatly reduces run time
(approximately by 5 min or more). Thus, this patch also changes
post_test_hook to forcibly set Keystone v3 auth in the tempest
gates, so that tests run much faster.
Currently time.sleep(1) is used to avoid rounding issues with the
"created_at" field when creating a token. This field drops the
milliseconds from the time field. Attempting to use a token before
the time in the "created_at" field results in an error, meaning that
it is necessary to do time.sleep(1). However, with Keystone v3 this
is not the case, so this time.sleep(1) can be avoided with v3, resulting
in much faster overall test execution time.
Change-Id: I679f75b54bcc61f688f761a6e6f16d4cf0173cb7
2 files changed