Example #1
0
 def test_send_cross_project(self):
     sid, message = base.generate_small_message()
     headers = {'X-Roles': 'admin, monitoring-delegate'}
     cross_tennant_id = '2106b2c8da0eecdb3df4ea84a0b5624b'
     fields = {'project_id': cross_tennant_id}
     response = self._run_and_wait(sid, message, headers=headers, fields=fields)
     log_msg = response[0]
     for key in CONF.monitoring.log_project_id_path:
         log_msg = log_msg.pop(key)
     self.assertThat(log_msg,
                     matchers.StartsWith(cross_tennant_id))
Example #2
0
 def test_send_cross_tenant(self):
     sid, message = base.generate_small_message()
     headers = {'X-Roles': 'admin, monitoring-delegate'}
     cross_tennant_id = '2106b2c8da0eecdb3df4ea84a0b5624b'
     fields = {'tenant_id': cross_tennant_id}
     response = self._run_and_wait(sid,
                                   message,
                                   headers=headers,
                                   fields=fields)
     self.assertThat(response[0]['_source']['tenant'],
                     matchers.StartsWith(cross_tennant_id))
Example #3
0
 def test_small_message_multiline(self):
     sid, message = base.generate_small_message()
     self._run_and_wait(sid, message.replace(' ', '\n'))
Example #4
0
 def test_small_message(self):
     self._run_and_wait(*base.generate_small_message())
 def test_unicode_message(self):
     for m in _UNICODE_CASES:
         self._run_and_wait(*base.generate_small_message(m['input']),
                            headers={'LA-Unicode-Case': m['case']})