Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
Assassin718 committed Aug 19, 2024
1 parent 8e2a268 commit c1257b0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/cn/developer-guide/test/benchmark.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Feature: performance file to blackhole vector
- `@e2e-performance @docker-compose`: 表示测试场景为e2e-performance,测试场景由本地docker-compose运行
- `Given {docker-compose} environment`: 配置启动测试环境,以docker-compose环境启动测试
- `Given docker-compose type {benchmark}`: 配置docker-compose启动模式,以benchmark模式启动docker-compose,`{}`中参数有两种选项,`e2e`/`benchmark`。以`e2e`模式启动会默认启动ilogtail、goc-server容器,用作e2e测试;以`benchmark`模式启动会默认启动cadvisor容器,用于监控容器运行过程中的资源占用;若在配置文件中不配置该参数,则默认以上一个scenario的启动模式启动。
- `When start docker-compose {scenario directory}`: `{}`中参数为当前scenario的文件夹名,该行动作会读取`scenario director`文件夹下的docker-compose.yaml文件,通过docker-compose命令启动所有容器
- `When start docker-compose {directory}`: `{}`中参数为当前scenario的文件夹名,该行动作会读取`director`文件夹下的docker-compose.yaml文件,通过docker-compose命令启动所有容器
- `When start monitor {vector}`: `{}`中参数为待监控的容器,该参数需要与docker-compose中的service name相同
- `When generate logs to file`: 生成测试数据,其他生成测试数据的方法请参考[e2e-test-step.md](./e2e-test-step.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ transforms:
- transform_json
condition:
type: "vrl"
source: ."usr-agent" == "no-agent"
source: ."user-agent" == "no-agent"

sinks:
output_std:
Expand Down
9 changes: 7 additions & 2 deletions test/engine/setup/dockercompose/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ import (
"sync"
)

const (
dockerComposeTypeE2E = "e2e"
dockerComposeTypeBenchmark = "benchmark"
)

var networkMapping = make(map[string]string)
var mu sync.Mutex
var instance Booter
Expand All @@ -37,9 +42,9 @@ func Load(loadType string) error {
mu.Lock()
defer mu.Unlock()
switch loadType {
case "e2e":
case dockerComposeTypeE2E:
instance = NewComposeBooter()
case "benchmark":
case dockerComposeTypeBenchmark:
instance = NewComposeBenchmarkBooter()
default:
return errors.New("invalid load type")
Expand Down

0 comments on commit c1257b0

Please sign in to comment.