Fix test_provider_token_expiration_validation transient failure

The keystone.tests.test_token_provider.TestTokenProvider.
test_provider_token_expiration_validation test would fail if the
tests weren't run before the expiration period passed. This could
happen if the system was slow and the previous tests took a long
time causing a potential transient failure.

Change-Id: I123aadd55770002fe1c9ed9b17669d5212198aa3
Closes-Bug: #1278550
This commit is contained in:
Brant Knudson 2014-02-25 10:12:15 -06:00
parent b870d88c7d
commit 170faf1468

View File

@ -648,7 +648,8 @@ def create_v2_token():
return {
"access": {
"token": {
"expires": timeutils.isotime(CURRENT_DATE + FUTURE_DELTA),
"expires": timeutils.isotime(timeutils.utcnow() +
FUTURE_DELTA),
"issued_at": "2013-05-21T00:02:43.941473Z",
"tenant": {
"enabled": True,
@ -679,7 +680,7 @@ def create_v3_token():
return {
"token": {
'methods': [],
"expires_at": timeutils.isotime(CURRENT_DATE + FUTURE_DELTA),
"expires_at": timeutils.isotime(timeutils.utcnow() + FUTURE_DELTA),
"issued_at": "2013-05-21T00:02:43.941473Z",
}
}