Skip to content

Commit

Permalink
Calculate exception fields just with mappings validation (#2280)
Browse files Browse the repository at this point in the history
Obtain the list of exception fields to be used with the new validation
based on mappings when this method is selected (via environment variable).
  • Loading branch information
mrodm authored Dec 16, 2024
1 parent 70040c9 commit aaf158c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/testrunner/runners/system/tester.go
Original file line number Diff line number Diff line change
Expand Up @@ -1524,10 +1524,10 @@ func (r *tester) validateTestScenario(ctx context.Context, result *testrunner.Re
return result.WithError(err)
}

exceptionFields := listExceptionFields(scenario.docs, fieldsValidator)

if r.fieldValidationMethod == allMethods || r.fieldValidationMethod == mappingsMethod {
logger.Warn("Validate mappings found (technical preview)")
exceptionFields := listExceptionFields(scenario.docs, fieldsValidator)

mappingsValidator, err := fields.CreateValidatorForMappings(r.dataStreamPath, r.esClient,
fields.WithMappingValidatorFallbackSchema(fieldsValidator.Schema),
fields.WithMappingValidatorIndexTemplate(scenario.indexTemplateName),
Expand Down

0 comments on commit aaf158c

Please sign in to comment.