Skip to content

Commit

Permalink
Use policy template name to generate input name
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-gr committed Jun 12, 2023
1 parent 94f8fd4 commit fc37e66
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion internal/benchrunner/runners/system/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,14 @@ func (r *runner) createPackagePolicy(pkgManifest *packages.PackageManifest, p *k
r.scenario.Package = pkgManifest.Name
}

// TODO: add ability to define which policy template to use
pp := kibana.PackagePolicy{
Namespace: "ep",
PolicyID: p.ID,
Vars: r.scenario.Vars,
Force: true,
Inputs: map[string]kibana.PackagePolicyInput{
fmt.Sprintf("%s-%s", r.scenario.DataStream.Name, r.scenario.Input): {
fmt.Sprintf("%s-%s", pkgManifest.PolicyTemplates[0].Name, r.scenario.Input): {
Enabled: true,
Streams: map[string]kibana.PackagePolicyStream{
fmt.Sprintf("%s.%s", pkgManifest.Name, r.scenario.DataStream.Name): {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description: Benchmark 100MiB of data ingested
input: filestream
vars: ~
data_stream.name: test
data_stream.name: testds
data_stream.vars.paths:
- "{{SERVICE_LOGS_DIR}}/corpus-*"
warmup_time_period: 10s
Expand Down
2 changes: 1 addition & 1 deletion test/packages/benchmarks/system_benchmark/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type: integration
conditions:
kibana.version: '^8.0.0'
policy_templates:
- name: test
- name: testpo
title: Test
description: Description
inputs:
Expand Down

0 comments on commit fc37e66

Please sign in to comment.