Skip to content

Commit 5fead4e

Browse files
author
Ron cohen
committed
Fix tests
1 parent ff851cd commit 5fead4e

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

processor/error/package_tests/json_schema_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"testing"
55

66
er "github.com/elastic/apm-server/processor/error"
7+
generatedschemas "github.com/elastic/apm-server/processor/error/generated-schemas"
78
"github.com/elastic/apm-server/tests"
89
)
910

@@ -26,7 +27,7 @@ func TestPayloadAttributesInSchema(t *testing.T) {
2627
"errors.context.request.cookies.c2",
2728
"errors.context.tags.organization_uuid",
2829
)
29-
tests.TestPayloadAttributesInSchema(t, "error", undocumented, er.Schema())
30+
tests.TestPayloadAttributesInSchema(t, "error", undocumented, generatedschemas.PayloadSchema)
3031
}
3132

3233
func TestJsonSchemaKeywordLimitation(t *testing.T) {
@@ -45,7 +46,7 @@ func TestJsonSchemaKeywordLimitation(t *testing.T) {
4546
"error id icon",
4647
"view errors",
4748
)
48-
tests.TestJsonSchemaKeywordLimitation(t, fieldsPaths, er.Schema(), exceptions)
49+
tests.TestJsonSchemaKeywordLimitation(t, fieldsPaths, generatedschemas.PayloadSchema, exceptions)
4950
}
5051

5152
func TestErrorPayloadSchema(t *testing.T) {

processor/sourcemap/package_tests/json_schema_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"testing"
55

66
"github.com/elastic/apm-server/processor/sourcemap"
7+
generatedschemas "github.com/elastic/apm-server/processor/sourcemap/generated-schemas"
78
"github.com/elastic/apm-server/tests"
89
)
910

@@ -14,7 +15,7 @@ func TestPayloadAttributesInSchema(t *testing.T) {
1415
"sourcemap",
1516
tests.NewSet("sourcemap", "sourcemap.file", "sourcemap.names", "sourcemap.sources", "sourcemap.sourceRoot",
1617
"sourcemap.mappings", "sourcemap.sourcesContent", "sourcemap.version"),
17-
sourcemap.Schema())
18+
generatedschemas.SourcemapSchema)
1819
}
1920

2021
func TestSourcemapPayloadSchema(t *testing.T) {

processor/transaction/package_tests/json_schema_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"testing"
55

66
"github.com/elastic/apm-server/processor/transaction"
7+
generatedschemas "github.com/elastic/apm-server/processor/transaction/generated-schemas"
78
"github.com/elastic/apm-server/tests"
89
)
910

@@ -40,7 +41,7 @@ func TestPayloadAttributesInSchema(t *testing.T) {
4041
"transactions.marks.navigationTiming.navigationStart",
4142
"transactions.marks.performance",
4243
)
43-
tests.TestPayloadAttributesInSchema(t, "transaction", undocumented, transaction.Schema())
44+
tests.TestPayloadAttributesInSchema(t, "transaction", undocumented, generatedschemas.PayloadSchema)
4445
}
4546

4647
func TestJsonSchemaKeywordLimitation(t *testing.T) {
@@ -49,7 +50,7 @@ func TestJsonSchemaKeywordLimitation(t *testing.T) {
4950
"./../_meta/fields.yml",
5051
}
5152
exceptions := tests.NewSet("processor.event", "processor.name", "context.service.name", "transaction.id", "listening")
52-
tests.TestJsonSchemaKeywordLimitation(t, fieldsPaths, transaction.Schema(), exceptions)
53+
tests.TestJsonSchemaKeywordLimitation(t, fieldsPaths, generatedschemas.PayloadSchema, exceptions)
5354
}
5455

5556
func TestTransactionPayloadSchema(t *testing.T) {

0 commit comments

Comments
 (0)