Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.4] use mage in windows test runner (#1301) #1309

Merged
merged 1 commit into from
Aug 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions tests/system/apmserver.py
Original file line number Diff line number Diff line change
@@ -240,8 +240,7 @@ def check_for_no_smap(self, doc):
assert "sourcemap" not in frame


class ClientSideBaseTest(ElasticTest):

class ClientSideBaseTest(ServerBaseTest):
transactions_url = 'http://localhost:8200/v1/rum/transactions'
errors_url = 'http://localhost:8200/v1/rum/errors'
sourcemap_url = 'http://localhost:8200/v1/rum/sourcemaps'
@@ -282,6 +281,8 @@ def upload_sourcemap(self, file_name='bundle_no_mapping.js.map',
})
return r


class ClientSideElasticTest(ClientSideBaseTest, ElasticTest):
def wait_for_sourcemaps(self, expected_ct=1):
idx = self.smap_index_pattern
self.wait_until(
@@ -311,7 +312,8 @@ def check_rum_transaction_sourcemap(self, updated, expected_err=None, count=1):
span = doc["_source"]["span"]
self.check_smap(span, updated, expected_err)

def check_smap(self, doc, updated, err=None):
@staticmethod
def check_smap(doc, updated, err=None):
if "stacktrace" not in doc:
return
for frame in doc["stacktrace"]:
@@ -348,14 +350,14 @@ def config(self):
return cfg


class SmapCacheBaseTest(ClientSideBaseTest):
class SmapCacheBaseTest(ClientSideElasticTest):
def config(self):
cfg = super(SmapCacheBaseTest, self).config()
cfg.update({"smap_cache_expiration": "1"})
return cfg


class SmapIndexBaseTest(ClientSideBaseTest):
class SmapIndexBaseTest(ClientSideElasticTest):
@classmethod
def setUpClass(cls):
super(SmapIndexBaseTest, cls).setUpClass()
6 changes: 3 additions & 3 deletions tests/system/test_integration.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
import unittest

from apmserver import ElasticTest, ExpvarBaseTest
from apmserver import ClientSideBaseTest, SmapIndexBaseTest, SmapCacheBaseTest
from apmserver import ClientSideElasticTest, SmapIndexBaseTest, SmapCacheBaseTest
from apmserver import SplitIndicesTest
from beat.beat import INTEGRATION_TESTS
import json
@@ -113,7 +113,7 @@ def dump(self, data):
return json.dumps(data, indent=4, separators=(',', ': '))


class RumEnabledIntegrationTest(ClientSideBaseTest):
class RumEnabledIntegrationTest(ClientSideElasticTest):
@unittest.skipUnless(INTEGRATION_TESTS, "integration test")
def test_backend_error(self):
self.load_docs_with_template(self.get_error_payload_path(name="payload.json"),
@@ -257,7 +257,7 @@ def test_split_docs_into_separate_indices(self):
assert 5 == ct


class SourcemappingIntegrationTest(ClientSideBaseTest):
class SourcemappingIntegrationTest(ClientSideElasticTest):

@unittest.skipUnless(INTEGRATION_TESTS, "integration test")
def test_backend_error(self):