Skip to content

Commit

Permalink
Remove e2e and add another UT to check extract result.
Browse files Browse the repository at this point in the history
  • Loading branch information
weixiang1862 committed Nov 3, 2023
1 parent 519e543 commit 38c4431
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 150 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/skywalking.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -440,9 +440,6 @@ jobs:
config: test/e2e-v2/cases/log/fluent-bit/e2e.yaml
env: ES_VERSION=8.8.1

- name: Log Extract Timestamp
config: test/e2e-v2/cases/log/extract-timestamp/e2e.yaml

- name: Trace Profiling BanyanDB
config: test/e2e-v2/cases/profiling/trace/banyandb/e2e.yaml
- name: Trace Profiling H2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,34 @@ public void test() throws Exception {
assertEquals(1, response.getMetrics().iterator().next().getValue());
assertEquals(12312313, response.getMetrics().iterator().next().getTimestamp());
}

@Test
public void testExtractPatternedTimestamp() throws Exception {
when(config.isEnableLogTestTool()).thenReturn(true);
final LogTestQuery query = new LogTestQuery(moduleManager, config);
final LogTestRequest request = new LogTestRequest();
request.setLog("" +
"{" +
" body: {" +
" json: {" +
" json: '{\"request\": \"GET /l HTTP/1.1\",\"time\": \"2023-11-02T12:39:36+00:00\",\"status\": \"404\",\"request_time\":\"0.000\"}'" +
" }" +
" }," +
" type: JSON," +
" timestamp: 12312313," +
" service: 'test'" +
"}");
request.setDsl("" +
"filter {\n" +
" json {" +
" }\n" +
" extractor {\n" +
" timestamp parsed.time as String, \"yyyy-MM-dd'T'HH:mm:ssXXX\"\n" +
" }\n" +
" sink {\n" +
" }\n" +
"}");
final LogTestResponse response = query.test(request);
assertEquals(1698928776000L, response.getLog().getTimestamp());
}
}
64 changes: 0 additions & 64 deletions test/e2e-v2/cases/log/extract-timestamp/docker-compose.yml

This file was deleted.

47 changes: 0 additions & 47 deletions test/e2e-v2/cases/log/extract-timestamp/e2e.yaml

This file was deleted.

36 changes: 0 additions & 36 deletions test/e2e-v2/cases/log/extract-timestamp/lal.yaml

This file was deleted.

0 comments on commit 38c4431

Please sign in to comment.