Merge "functional: Grab the service version from the module"
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
"disabled_reason": null,
|
||||
"report_count": 1,
|
||||
"forced_down": false,
|
||||
"version": 8
|
||||
"version": %(current_service_version)s
|
||||
}
|
||||
},
|
||||
"event_type": "service.update",
|
||||
|
||||
@@ -16,6 +16,7 @@ import os
|
||||
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from nova.objects import service as service_obj
|
||||
from nova import test
|
||||
from nova.tests import fixtures as nova_fixtures
|
||||
from nova.tests.unit import fake_notifier
|
||||
@@ -85,6 +86,8 @@ class NotificationSampleTestBase(test.TestCase):
|
||||
|
||||
with open(self._get_notification_sample(sample_file_name)) as sample:
|
||||
sample_data = sample.read()
|
||||
sample_data = sample_data % {
|
||||
"current_service_version": service_obj.SERVICE_VERSION}
|
||||
|
||||
sample_obj = jsonutils.loads(sample_data)
|
||||
self._apply_replacements(replacements, sample_obj)
|
||||
|
||||
Reference in New Issue
Block a user