From a96150009df2a708e0dab6273863f8e35c6fd5de Mon Sep 17 00:00:00 2001 From: Hiroaki Kobayashi Date: Wed, 13 Dec 2017 16:33:07 +0900 Subject: [PATCH] Change lease start date in some test scenarios This patch changes the start date of leases to "now" to prevent them from being rejected for starting before the current date. Closes-Bug: #1737880 Change-Id: Ic6b66c2b321ea01ebe9d71486e4357f5b93a5fe2 --- .../tests/scenario/test_host_reservation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/blazar_tempest_plugin/tests/scenario/test_host_reservation.py b/blazar_tempest_plugin/tests/scenario/test_host_reservation.py index 2560df0..0f9f382 100644 --- a/blazar_tempest_plugin/tests/scenario/test_host_reservation.py +++ b/blazar_tempest_plugin/tests/scenario/test_host_reservation.py @@ -53,7 +53,7 @@ class TestHostReservationScenario(rrs.ResourceReservationScenarioTest): current_time = datetime.datetime.utcnow() end_time = current_time + datetime.timedelta(hours=1) body = { - "start_date": current_time.strftime('%Y-%m-%d %H:%M'), + "start_date": "now", "end_date": end_time.strftime('%Y-%m-%d %H:%M'), "name": lease_name, "events": [], @@ -75,7 +75,7 @@ class TestHostReservationScenario(rrs.ResourceReservationScenarioTest): current_time = datetime.datetime.utcnow() end_time = current_time + datetime.timedelta(hours=1) body = { - "start_date": current_time.strftime('%Y-%m-%d %H:%M'), + "start_date": "now", "end_date": end_time.strftime('%Y-%m-%d %H:%M'), "name": lease_name, "events": [], @@ -96,7 +96,7 @@ class TestHostReservationScenario(rrs.ResourceReservationScenarioTest): current_time = datetime.datetime.utcnow() end_time = current_time + datetime.timedelta(hours=1) body = { - "start_date": current_time.strftime('%Y-%m-%d %H:%M'), + "start_date": "now", "end_date": end_time.strftime('%Y-%m-%d %H:%M'), "name": lease_name, "events": [], @@ -118,7 +118,7 @@ class TestHostReservationScenario(rrs.ResourceReservationScenarioTest): current_time = datetime.datetime.utcnow() end_time = current_time + datetime.timedelta(seconds=90) body = { - 'start_date': current_time.strftime('%Y-%m-%d %H:%M'), + 'start_date': "now", 'end_date': end_time.strftime('%Y-%m-%d %H:%M'), 'name': lease_name, 'events': [],