Skip to content

Commit

Permalink
Add missing exports tests and better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-gr committed Aug 31, 2020
1 parent 73921ce commit eedc0e8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
3 changes: 2 additions & 1 deletion libbeat/tests/system/beat/common_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ def run_export_cmd(self, cmd, extra=[]):
if len(extra) != 0:
args += extra
exit_code = self.run_beat(extra_args=args, logging_args=[])
assert exit_code == 0
output = self.get_log()
if exit_code != 0:
raise Exception("export command returned with an error: {}".format(output))
trailer = "\nPASS\n"
pos = output.rfind(trailer)
if pos == -1:
Expand Down
12 changes: 12 additions & 0 deletions x-pack/auditbeat/tests/system/test_exports.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import jinja2
import os
import platform
import sys
import time
import unittest

from auditbeat_xpack import *
from beat import common_tests

class Test(AuditbeatXPackTest, common_tests.TestExportsMixin):
pass
2 changes: 1 addition & 1 deletion x-pack/functionbeat/provider/aws/aws/kinesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (s *startingPosition) Unpack(str string) error {
func (s *startingPosition) String() string {
v, ok := mapStartingPositionReverse[*s]
if !ok {
panic("unknown starting position: " + string(*s))
panic("unknown starting position: " + fmt.Sprint(*s))
}
return v
}
Expand Down
4 changes: 2 additions & 2 deletions x-pack/metricbeat/tests/system/test_xpack_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import xpack_metricbeat
import test_base
from beat import common_tests


class Test(xpack_metricbeat.XPackTest, test_base.Test):
class Test(xpack_metricbeat.XPackTest, test_base.Test, common_tests.TestExportsMixin):
pass

0 comments on commit eedc0e8

Please sign in to comment.