From e147796643ea5fad5f856147e6213013c355723e Mon Sep 17 00:00:00 2001 From: shuiyisong Date: Fri, 9 Aug 2024 17:44:00 +0800 Subject: [PATCH] chore: revert tests --- src/pipeline/tests/gsub.rs | 6 +++--- src/pipeline/tests/pipeline.rs | 22 ++++++++++------------ tests-integration/tests/http.rs | 12 ++++++------ 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/pipeline/tests/gsub.rs b/src/pipeline/tests/gsub.rs index 55f8ced922dd..b7044b9a1834 100644 --- a/src/pipeline/tests/gsub.rs +++ b/src/pipeline/tests/gsub.rs @@ -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); diff --git a/src/pipeline/tests/pipeline.rs b/src/pipeline/tests/pipeline.rs index cf46566535cf..af3b5a8c2075 100644 --- a/src/pipeline/tests/pipeline.rs +++ b/src/pipeline/tests/pipeline.rs @@ -93,7 +93,7 @@ processors: - queryStr method: decode ignore_missing: true - - timestamp: + - epoch: field: reqTimeSec resolution: second ignore_missing: true @@ -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: @@ -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::>(); + ] + .into_iter() + .map(|(_, d)| GreptimeValue { value_data: d }) + .collect::>(); let yaml_content = Content::Yaml(pipeline_yaml.into()); let pipeline: Pipeline = @@ -478,7 +476,7 @@ processors: - line patterns: - "%{+ts} %{+ts} %{content}" - - timestamp: + - date: fields: - ts formats: @@ -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()); diff --git a/tests-integration/tests/http.rs b/tests-integration/tests/http.rs index fcef9f9f5920..db8df835a587 100644 --- a/tests-integration/tests/http.rs +++ b/tests-integration/tests/http.rs @@ -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" @@ -1052,8 +1052,8 @@ transform: - logger type: string - field: time - type: timestamp, ns - index: time + type: time + index: timestamp "#; // 1. create pipeline @@ -1156,7 +1156,7 @@ processors: - line patterns: - "%{+ts} %{+ts} %{content}" - - timestamp: + - date: fields: - ts formats: @@ -1167,8 +1167,8 @@ transform: - content type: string - field: ts - type: timestamp, ns - index: time + type: time + index: timestamp "#; // 1. create pipeline