Skip to content

Commit

Permalink
Merge pull request #13 from shuiyisong/chore/revert_tests
Browse files Browse the repository at this point in the history
chore: revert tests
  • Loading branch information
paomian authored Aug 9, 2024
2 parents 41f3c27 + e147796 commit 0713498
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 21 deletions.
6 changes: 3 additions & 3 deletions src/pipeline/tests/gsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ processors:
field: reqTimeSec
pattern: "\\."
replacement: ""
- timestamp:
- epoch:
field: reqTimeSec
resolution: millisecond
ignore_missing: true
transform:
- field: reqTimeSec
type: timestamp, millisecond
index: time
type: epoch, millisecond
index: timestamp
"#;

let output = common::parse_and_exec(input_value_str, pipeline_yaml);
Expand Down
22 changes: 10 additions & 12 deletions src/pipeline/tests/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ processors:
- queryStr
method: decode
ignore_missing: true
- timestamp:
- epoch:
field: reqTimeSec
resolution: second
ignore_missing: true
Expand Down Expand Up @@ -189,8 +189,8 @@ transform:
# index: fulltext
- field: reqTimeSec, req_time_sec
# epoch time is special, the resolution MUST BE specified
type: timestamp, second
index: time
type: epoch, second
index: timestamp
# the following is from cmcd
- fields:
Expand Down Expand Up @@ -414,12 +414,10 @@ transform:
("breadcrumbs_cloud_wrapper_turn_around_time", None),
("breadcrumbs_cloud_wrapper_dns_lookup_time", None),
("breadcrumbs_cloud_wrapper_asn", None),
];
// expected_values.sort_by_key(|x| x.0);
let expected_values = expected_values
.into_iter()
.map(|(_, d)| GreptimeValue { value_data: d })
.collect::<Vec<GreptimeValue>>();
]
.into_iter()
.map(|(_, d)| GreptimeValue { value_data: d })
.collect::<Vec<GreptimeValue>>();

let yaml_content = Content::Yaml(pipeline_yaml.into());
let pipeline: Pipeline<GreptimeTransformer> =
Expand Down Expand Up @@ -478,7 +476,7 @@ processors:
- line
patterns:
- "%{+ts} %{+ts} %{content}"
- timestamp:
- date:
fields:
- ts
formats:
Expand All @@ -489,8 +487,8 @@ transform:
- content
type: string
- field: ts
type: timestamp, ns
index: time
type: time
index: timestamp
"#;

let yaml_content = Content::Yaml(pipeline_yaml.into());
Expand Down
12 changes: 6 additions & 6 deletions tests-integration/tests/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ pub async fn test_pipeline_api(store_type: StorageType) {

let body = r#"
processors:
- timestamp:
- date:
field: time
formats:
- "%Y-%m-%d %H:%M:%S%.3f"
Expand All @@ -1052,8 +1052,8 @@ transform:
- logger
type: string
- field: time
type: timestamp, ns
index: time
type: time
index: timestamp
"#;

// 1. create pipeline
Expand Down Expand Up @@ -1156,7 +1156,7 @@ processors:
- line
patterns:
- "%{+ts} %{+ts} %{content}"
- timestamp:
- date:
fields:
- ts
formats:
Expand All @@ -1167,8 +1167,8 @@ transform:
- content
type: string
- field: ts
type: timestamp, ns
index: time
type: time
index: timestamp
"#;

// 1. create pipeline
Expand Down

0 comments on commit 0713498

Please sign in to comment.