Browse Source

Merge "Make rejectable_message_size configurable for log-api tests"

Zuul 1 month ago
parent
commit
fa5f826138
2 changed files with 10 additions and 2 deletions
  1. 6
    1
      monasca_tempest_tests/config.py
  2. 4
    1
      monasca_tempest_tests/tests/log_api/base.py

+ 6
- 1
monasca_tempest_tests/config.py View File

@@ -54,5 +54,10 @@ MonitoringGroup = [
54 54
                help='monasca-log-api API version'),
55 55
     cfg.StrOpt('kibana_version',
56 56
                default='4.6.3',
57
-               help='Kibana version')
57
+               help='Kibana version'),
58
+    cfg.IntOpt('log_api_max_log_size',
59
+               default=1024 * 1024,
60
+               help=('Refers to payload/envelope size. This should be set '
61
+                     'to the same value as "[service]max_log_size" in the '
62
+                     'monasca-log-api configuration'))
58 63
 ]

+ 4
- 1
monasca_tempest_tests/tests/log_api/base.py View File

@@ -40,7 +40,10 @@ def _get_message_size(size_base):
40 40
 _SMALL_MESSAGE_SIZE = _get_message_size(0.001)
41 41
 _MEDIUM_MESSAGE_SIZE = _get_message_size(0.01)
42 42
 _LARGE_MESSAGE_SIZE = _get_message_size(0.1)
43
-_REJECTABLE_MESSAGE_SIZE = _get_message_size(1.1)
43
+# rejectable message must be larger than [service]max_log_size
44
+# from monasca-log-api.conf
45
+_reject_size = CONF.monitoring.log_api_max_log_size/_ONE_MB + 0.1
46
+_REJECTABLE_MESSAGE_SIZE = _get_message_size(_reject_size)
44 47
 
45 48
 
46 49
 def generate_unique_message(message=None, size=50):

Loading…
Cancel
Save