Exemplo n.º 1
0
 def test_get_sentry_message(self):
     config = dict(
         project='custodian',
         account_name='c7n-test',
         account_id='9111411911411',
     )
     sentry_msg = c7nsentry.get_sentry_message(
         config, {'logGroup': '/cloud-custodian/',
                  'logStream': 'night-policy', 'logEvents': [{
                      'message': msg, 'timestamp': time.time() * 1000}]})
     self.assertEqual(sentry_msg['user'], {
         'id': config['account_id'], 'username': config['account_name']})
Exemplo n.º 2
0
 def test_get_sentry_message(self):
     config = dict(
         project='custodian',
         account_name='c7n-test',
         account_id='9111411911411',
     )
     sentry_msg = c7nsentry.get_sentry_message(
         config, {
             'logGroup': '/cloud-custodian/',
             'logStream': 'night-policy',
             'logEvents': [{
                 'message': msg,
                 'timestamp': time.time() * 1000
             }]
         })
     self.assertEqual(sentry_msg['user'], {
         'id': config['account_id'],
         'username': config['account_name']
     })