Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoriano committed Aug 23, 2024
1 parent 63f5099 commit 19eb6d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions internal/fields/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,12 @@ func initDependencyManagement(packageRoot string, specVersion semver.Version, im
return nil, nil, err
}
logger.Debugf("Imported ECS fields definition from external schema for validation (embedded in package: %v, stack uses ecs@mappings template: %v)", packageEmbedsEcsMappings, stackSupportsEcsMapping)
if stackSupportsEcsMapping {
// ecs@mappings adds additional multifields that are not defined anywhere. Add them here to the expected mappings.
ecsSchema = appendECSMappingMultifields(ecsSchema, "")
}

// ecs@mappings adds additional multifields that are not defined anywhere. Add them here to the expected mappings.
// Adding them also in cases where stackSupportsEcsMapping is false so these packages can be tested with versions
// of the stack that support ecs@mappings.
ecsSchema = appendECSMappingMultifields(ecsSchema, "")

schema = ecsSchema
}

Expand Down
1 change: 1 addition & 0 deletions test/packages/parallel/ti_anomali.stack_provider_settings
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
stack.logsdb_enabled=false

0 comments on commit 19eb6d0

Please sign in to comment.