Skip to content

Commit aaf158c

Browse files
authored
Calculate exception fields just with mappings validation (#2280)
Obtain the list of exception fields to be used with the new validation based on mappings when this method is selected (via environment variable).
1 parent 70040c9 commit aaf158c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/testrunner/runners/system/tester.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1524,10 +1524,10 @@ func (r *tester) validateTestScenario(ctx context.Context, result *testrunner.Re
15241524
return result.WithError(err)
15251525
}
15261526

1527-
exceptionFields := listExceptionFields(scenario.docs, fieldsValidator)
1528-
15291527
if r.fieldValidationMethod == allMethods || r.fieldValidationMethod == mappingsMethod {
15301528
logger.Warn("Validate mappings found (technical preview)")
1529+
exceptionFields := listExceptionFields(scenario.docs, fieldsValidator)
1530+
15311531
mappingsValidator, err := fields.CreateValidatorForMappings(r.dataStreamPath, r.esClient,
15321532
fields.WithMappingValidatorFallbackSchema(fieldsValidator.Schema),
15331533
fields.WithMappingValidatorIndexTemplate(scenario.indexTemplateName),

0 commit comments

Comments
 (0)