Skip to content

Commit

Permalink
Skip login dataset tests when not on a little-endian system.
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Wurm committed Jan 29, 2019
1 parent c649510 commit b1f70fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions x-pack/auditbeat/module/system/login/login_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@
package login

import (
"encoding/binary"
"testing"

"github.com/elastic/beats/auditbeat/core"
mbtest "github.com/elastic/beats/metricbeat/mb/testing"
)

func TestData(t *testing.T) {
if byteOrder != binary.LittleEndian {
t.Skip("Test only works on little-endian systems - skipping.")
}

f := mbtest.NewReportingMetricSetV2(t, getConfig())
events, errs := mbtest.ReportingFetchV2(f)
if len(errs) > 0 {
Expand Down
1 change: 1 addition & 0 deletions x-pack/auditbeat/tests/system/test_metricsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def test_metricset_host(self):
self.check_metricset("system", "host", COMMON_FIELDS + fields, warnings_allowed=True)

@unittest.skipUnless(sys.platform == "linux2", "Only implemented for Linux")
@unittest.skipIf(sys.byteorder != "little", "Test only implemented for little-endian systems")
def test_metricset_login(self):
"""
login metricset collects information about logins (successful and failed) and system restarts.
Expand Down

0 comments on commit b1f70fb

Please sign in to comment.