From fa2642a289d2e74ae31c9f678994b6ae37621bbf Mon Sep 17 00:00:00 2001 From: Ivan Kolodyazhny Date: Tue, 15 Sep 2020 14:59:19 +0000 Subject: [PATCH] Do not check created_at attribute in test_service_list test Tempest could be used not only after initial deployment but for cloud verification during operations or after update. We don't need to check that services are created today. Depends-On: https://review.opendev.org/#/c/751657/ Change-Id: Ifc3cb1933a591ce1fe05fe11d5e07b78a0e61375 --- .../tests/api/services/test_service.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/vitrage_tempest_plugin/tests/api/services/test_service.py b/vitrage_tempest_plugin/tests/api/services/test_service.py index 735e962..6263259 100644 --- a/vitrage_tempest_plugin/tests/api/services/test_service.py +++ b/vitrage_tempest_plugin/tests/api/services/test_service.py @@ -12,10 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -from datetime import date import socket -from dateutil import parser from testtools import matchers from vitrage_tempest_plugin.tests.base import BaseVitrageTempest @@ -36,21 +34,10 @@ class ServiceTest(BaseVitrageTempest): def test_service_list(self): services = self.vitrage_client.service.list() - # NOTE(eyalb) test will run in the same day of - # process creation, might remove this if it causes - # problems - self.check_created(services, date.today()) - self.check_all_equal(services, SERVICES) self.check_all_hosted(services, socket.gethostname()) self.check_different_process_ids_for(services) - def check_created(self, services, today): - - created = {parser.parse(service['created']).date() - for service in services} - self.assert_set_equal({today}, created) - def check_all_equal(self, services, expected_svc_names): names = {service['name'].split(' ')[0] for service in services} self.assert_set_equal(expected_svc_names, names)