refactor: Update regular expression pattern for ARR body parsing
The code changes in `config.go` update the regular expression pattern for parsing ARR bodies. The previous pattern did not account for the optional time component in the body. The updated pattern now correctly captures the category, number, SSR, departure, arrival, and time components of the ARR body. This refactor ensures accurate parsing of ARR bodies and improves the overall functionality of the aviation parser.
This commit is contained in:
@@ -55,7 +55,7 @@ const (
|
||||
// - ssr: the alphanumeric SSR code
|
||||
// - departure: the four-letter departure airport code
|
||||
// - arrival: the four-letter arrival airport code
|
||||
arrPatternString = `^\((?P<category>[A-Z]{3})-(?P<number>[A-Z0-9]+)-(?P<ssr>[A-Z0-9]+)-(?P<departure>[A-Z]{4})-(?P<arrival>[A-Z]{4})\)$`
|
||||
arrPatternString = `^\((?P<category>[A-Z]{3})\-(?P<number>[A-Z0-9]+)(\-(?P<ssr>[A-Z]+[0-9]+))?\-(?P<departure>[A-Z]{4})\-(?P<arrival>[A-Z]{4})(?P<time>\d{4})\)$`
|
||||
|
||||
// depPatternString represents the regular expression pattern used to match departure patterns.
|
||||
// The pattern matches strings in the format: "(TYPE-NUMBER-SSR-DEPARTURE-DEPARTURE_TIME-ARRIVAL)".
|
||||
|
||||
@@ -16,6 +16,9 @@ const (
|
||||
BeginPartMarker = "BEGIN PART"
|
||||
)
|
||||
|
||||
var categoryRegex = regexp.MustCompile(`\(([A-Z]{3})(.*)\)`)
|
||||
var emptyLineRemove = regexp.MustCompile(`(?m)^\s*$`)
|
||||
|
||||
type BodyParser struct {
|
||||
bodyPatterns map[string]config.BodyConfig
|
||||
}
|
||||
@@ -38,20 +41,42 @@ func (bp *BodyParser) SetBodyPatterns(patterns map[string]config.BodyConfig) {
|
||||
// Parse attempts to parse the body text using the configured patterns.
|
||||
func (bp *BodyParser) Parse(body string) (interface{}, error) {
|
||||
log := utils.Logger
|
||||
for _, pattern := range bp.GetBodyPatterns() {
|
||||
for i, p := range pattern.Patterns {
|
||||
log.Debugf("Trying pattern %d: %s\n%s\n", i, p.Comments, p.Pattern)
|
||||
body = strings.TrimSpace(body)
|
||||
log.Info("Parsing body text", body)
|
||||
category := findCategory(body)
|
||||
if category == "" {
|
||||
log.Error("No category found in body text")
|
||||
return nil, fmt.Errorf("no category found in body text")
|
||||
}
|
||||
patters := bp.GetBodyPatterns()
|
||||
log.Infof("body config [%s] %v\n", category, patters[category])
|
||||
if patterConfig := patters[category]; patterConfig.Patterns != nil {
|
||||
|
||||
for _, p := range patterConfig.Patterns {
|
||||
log.Infof("Trying pattern %s\n%s\n", p.Comments, p.Pattern)
|
||||
|
||||
re := p.Expression
|
||||
match := re.FindStringSubmatch(body)
|
||||
log.Info("Match: ", match)
|
||||
if match != nil {
|
||||
log.Debugf("Matched: %v\n", match)
|
||||
log.Infof("Matched: %v\n", match)
|
||||
data := extractData(match, re)
|
||||
return createBodyData(data)
|
||||
}
|
||||
log.Debugf("No match for pattern %d\n", i)
|
||||
log.Infof("No match for pattern %s\n", p.Comments)
|
||||
}
|
||||
|
||||
}
|
||||
return nil, fmt.Errorf("no matching pattern found for body: %s", body)
|
||||
return nil, fmt.Errorf(" no matching pattern found for body: %s", body)
|
||||
}
|
||||
|
||||
func findCategory(body string) string {
|
||||
match := categoryRegex.FindStringSubmatch(body)
|
||||
utils.Logger.Infof("Match: %v\n", match)
|
||||
if match != nil {
|
||||
return match[1]
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// extractData extracts named groups from the regex match.
|
||||
@@ -75,6 +100,7 @@ func createBodyData(data map[string]string) (interface{}, error) {
|
||||
SSRModeAndCode: data["ssr"],
|
||||
DepartureAirport: data["departure"],
|
||||
ArrivalAirport: data["arrival"],
|
||||
ArrivalTime: data["time"],
|
||||
}, nil
|
||||
case "DEP":
|
||||
return &domain.DEP{
|
||||
@@ -132,9 +158,16 @@ func Parse(rawText string) (*domain.ParsedMessage, error) {
|
||||
return &message, nil
|
||||
}
|
||||
|
||||
// removeEmptyLines removes empty lines from a given text.
|
||||
func removeEmptyLines(text string) string {
|
||||
cleanedText := emptyLineRemove.ReplaceAllString(text, "")
|
||||
return strings.ReplaceAll(cleanedText, "\n\n", "\n")
|
||||
}
|
||||
|
||||
// parseHeader parses the header of the message and returns a ParsedMessage struct.
|
||||
func ParseHeader(fullMessage string) (domain.ParsedMessage, error) {
|
||||
fullMessage = strings.TrimSpace(fullMessage)
|
||||
fullMessage = removeEmptyLines(fullMessage)
|
||||
// fullMessage = strings.TrimSpace(fullMessage)
|
||||
lines := strings.Split(fullMessage, "\n")
|
||||
|
||||
startIndicator, messageID, dateTime, err := parseStartIndicator(lines[0])
|
||||
@@ -142,10 +175,11 @@ func ParseHeader(fullMessage string) (domain.ParsedMessage, error) {
|
||||
return domain.ParsedMessage{}, err
|
||||
}
|
||||
|
||||
priorityIndicator, primaryAddress, err := parsePriorityAndPrimary(lines[1])
|
||||
if err != nil {
|
||||
return domain.ParsedMessage{}, err
|
||||
}
|
||||
// priorityIndicator, primaryAddress, err := parsePriorityAndPrimary(lines[1])
|
||||
// if err != nil {
|
||||
// return domain.ParsedMessage{}, err
|
||||
// }
|
||||
priorityIndicator, primaryAddress := parsePriorityAndPrimary(lines[1])
|
||||
|
||||
secondaryAddresses, originator, originatorDateTime, bodyAndFooter := parseRemainingLines(lines[2:])
|
||||
|
||||
@@ -173,12 +207,12 @@ func parseStartIndicator(line string) (string, string, string, error) {
|
||||
}
|
||||
|
||||
// parsePriorityAndPrimary parses the priority indicator and primary address line.
|
||||
func parsePriorityAndPrimary(line string) (string, string, error) {
|
||||
func parsePriorityAndPrimary(line string) (string, string) {
|
||||
parts := strings.Fields(line)
|
||||
if len(parts) >= 2 {
|
||||
return parts[0], parts[1], nil
|
||||
return parts[0], parts[1]
|
||||
}
|
||||
return "", "", fmt.Errorf("invalid priority indicator line format: %s", line)
|
||||
return "", ""
|
||||
}
|
||||
|
||||
// parseRemainingLines parses the remaining lines of the message.
|
||||
@@ -208,6 +242,9 @@ func parseRemainingLines(lines []string) ([]string, string, string, string) {
|
||||
headerEnded = true
|
||||
case strings.HasPrefix(line, BeginPartMarker) || strings.HasPrefix(line, "("):
|
||||
headerEnded = true
|
||||
if strings.Index(line, "NNNN") > 0 {
|
||||
break
|
||||
}
|
||||
bodyAndFooter.WriteString(line + "\n")
|
||||
default:
|
||||
secondaryAddresses = append(secondaryAddresses, line)
|
||||
|
||||
@@ -124,10 +124,29 @@ NNNN
|
||||
})
|
||||
})
|
||||
Describe("ParseBody", func() {
|
||||
|
||||
Context("with ARR body (ARR-CES5470-ZBTJ-ZSHC1614)", func() {
|
||||
body := "(ARR-CES5470-ZBTJ-ZSHC1614)"
|
||||
parser := NewBodyParser()
|
||||
It("should parse the body correctly", func() {
|
||||
parsedBody, err := parser.Parse(body)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(parsedBody).ToNot(BeNil())
|
||||
Expect(parsedBody).To(BeAssignableToTypeOf(&domain.ARR{}))
|
||||
arrMessage := parsedBody.(*domain.ARR)
|
||||
Expect(arrMessage.Category).To(Equal("ARR"))
|
||||
Expect(arrMessage.AircraftID).To(Equal("CES5470"))
|
||||
Expect(arrMessage.DepartureAirport).To(Equal("ZBTJ"))
|
||||
Expect(arrMessage.ArrivalAirport).To(Equal("ZSHC"))
|
||||
Expect(arrMessage.ArrivalTime).To(Equal("1614"))
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
Context("with ARR body", func() {
|
||||
parser := NewBodyParser()
|
||||
It("should parse the body (ARR-AB123-SSR1234-KJFK-KLAX) correctly", func() {
|
||||
body := "(ARR-AB123-SSR1234-KJFK-KLAX)"
|
||||
It("should parse the body (ARR-AB123-SSR1234-KJFK-KLAX1234) correctly", func() {
|
||||
body := "(ARR-AB123-SSR1234-KJFK-KLAX1234)"
|
||||
parsedBody, err := parser.Parse(body)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(parsedBody).ToNot(BeNil())
|
||||
|
||||
@@ -0,0 +1,513 @@
|
||||
[
|
||||
{
|
||||
"SuitePath": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers",
|
||||
"SuiteDescription": "Parsers Suite",
|
||||
"SuiteLabels": [],
|
||||
"SuiteSucceeded": true,
|
||||
"SuiteHasProgrammaticFocus": false,
|
||||
"SpecialSuiteFailureReasons": null,
|
||||
"PreRunStats": {
|
||||
"TotalSpecs": 11,
|
||||
"SpecsThatWillRun": 2
|
||||
},
|
||||
"StartTime": "2024-07-21T23:58:50.688933981+08:00",
|
||||
"EndTime": "2024-07-21T23:58:50.689839193+08:00",
|
||||
"RunTime": 905233,
|
||||
"SuiteConfig": {
|
||||
"RandomSeed": 1721577530,
|
||||
"RandomizeAllSpecs": false,
|
||||
"FocusStrings": [
|
||||
"Aviation Parser ParseBody with ARR body"
|
||||
],
|
||||
"SkipStrings": null,
|
||||
"FocusFiles": null,
|
||||
"SkipFiles": null,
|
||||
"LabelFilter": "",
|
||||
"FailOnPending": false,
|
||||
"FailOnEmpty": false,
|
||||
"FailFast": false,
|
||||
"FlakeAttempts": 0,
|
||||
"MustPassRepeatedly": 0,
|
||||
"DryRun": false,
|
||||
"PollProgressAfter": 0,
|
||||
"PollProgressInterval": 0,
|
||||
"Timeout": 3599580726719,
|
||||
"EmitSpecProgress": false,
|
||||
"OutputInterceptorMode": "",
|
||||
"SourceRoots": null,
|
||||
"GracePeriod": 30000000000,
|
||||
"ParallelProcess": 1,
|
||||
"ParallelTotal": 1,
|
||||
"ParallelHost": ""
|
||||
},
|
||||
"SpecReports": [
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"Aviation Parser",
|
||||
"ParseHeader"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 10
|
||||
},
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 11
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 12
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should parse the header correctly",
|
||||
"State": "skipped",
|
||||
"StartTime": "2024-07-21T23:58:50.689002996+08:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"Aviation Parser",
|
||||
"ParseHeader"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 10
|
||||
},
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 11
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 42
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should parse the header correctly with originator information",
|
||||
"State": "skipped",
|
||||
"StartTime": "2024-07-21T23:58:50.689020459+08:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"Aviation Parser",
|
||||
"with NOTAM message"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 10
|
||||
},
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 88
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 89
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should parse the header correctly",
|
||||
"State": "skipped",
|
||||
"StartTime": "2024-07-21T23:58:50.68902758+08:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"Aviation Parser",
|
||||
"ParseBody",
|
||||
"with ARR body (ARR-CES5470-ZBTJ-ZSHC1614)"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 10
|
||||
},
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 126
|
||||
},
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 128
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 131
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should parse the body correctly",
|
||||
"State": "passed",
|
||||
"StartTime": "2024-07-21T23:58:50.689043688+08:00",
|
||||
"EndTime": "2024-07-21T23:58:50.689347442+08:00",
|
||||
"RunTime": 303788,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 1,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0,
|
||||
"SpecEvents": [
|
||||
{
|
||||
"SpecEventType": "Node",
|
||||
"CodeLocation": {
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 131
|
||||
},
|
||||
"TimelineLocation": {
|
||||
"Order": 1,
|
||||
"Time": "2024-07-21T23:58:50.689047942+08:00"
|
||||
},
|
||||
"Message": "should parse the body correctly",
|
||||
"NodeType": "It"
|
||||
},
|
||||
{
|
||||
"SpecEventType": "Node (End)",
|
||||
"CodeLocation": {
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 131
|
||||
},
|
||||
"TimelineLocation": {
|
||||
"Order": 3,
|
||||
"Time": "2024-07-21T23:58:50.689341334+08:00"
|
||||
},
|
||||
"Message": "should parse the body correctly",
|
||||
"Duration": 293422,
|
||||
"NodeType": "It"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"Aviation Parser",
|
||||
"ParseBody",
|
||||
"with ARR body"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 10
|
||||
},
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 126
|
||||
},
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 146
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 148
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should parse the body (ARR-AB123-SSR1234-KJFK-KLAX1234) correctly",
|
||||
"State": "passed",
|
||||
"StartTime": "2024-07-21T23:58:50.689389033+08:00",
|
||||
"EndTime": "2024-07-21T23:58:50.689700432+08:00",
|
||||
"RunTime": 311406,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 1,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0,
|
||||
"SpecEvents": [
|
||||
{
|
||||
"SpecEventType": "Node",
|
||||
"CodeLocation": {
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 148
|
||||
},
|
||||
"TimelineLocation": {
|
||||
"Order": 4,
|
||||
"Time": "2024-07-21T23:58:50.689391975+08:00"
|
||||
},
|
||||
"Message": "should parse the body (ARR-AB123-SSR1234-KJFK-KLAX1234) correctly",
|
||||
"NodeType": "It"
|
||||
},
|
||||
{
|
||||
"SpecEventType": "Node (End)",
|
||||
"CodeLocation": {
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 148
|
||||
},
|
||||
"TimelineLocation": {
|
||||
"Order": 6,
|
||||
"Time": "2024-07-21T23:58:50.689696036+08:00"
|
||||
},
|
||||
"Message": "should parse the body (ARR-AB123-SSR1234-KJFK-KLAX1234) correctly",
|
||||
"Duration": 304076,
|
||||
"NodeType": "It"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"Aviation Parser",
|
||||
"ParseBody",
|
||||
"with DEP body"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 10
|
||||
},
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 126
|
||||
},
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 164
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 166
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should parse the body (DEP-AB123-SSR1234-KJFK-1500-KLAX) correctly",
|
||||
"State": "skipped",
|
||||
"StartTime": "2024-07-21T23:58:50.68974927+08:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"Aviation Parser",
|
||||
"ParseBody",
|
||||
"with FPL body"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 10
|
||||
},
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 126
|
||||
},
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 182
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/aviation_parser_test.go",
|
||||
"LineNumber": 184
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should parse the body correctly",
|
||||
"State": "skipped",
|
||||
"StartTime": "2024-07-21T23:58:50.689775128+08:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"Pattern Parser",
|
||||
"FindPatterns"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/pattern_test.go",
|
||||
"LineNumber": 8
|
||||
},
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/pattern_test.go",
|
||||
"LineNumber": 10
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/pattern_test.go",
|
||||
"LineNumber": 11
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should return the correct BodyConfig based on the message body",
|
||||
"State": "skipped",
|
||||
"StartTime": "2024-07-21T23:58:50.68978383+08:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"Pattern Parser",
|
||||
"FindPatterns"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/pattern_test.go",
|
||||
"LineNumber": 8
|
||||
},
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/pattern_test.go",
|
||||
"LineNumber": 10
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/pattern_test.go",
|
||||
"LineNumber": 18
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should return nil if no pattern matches",
|
||||
"State": "skipped",
|
||||
"StartTime": "2024-07-21T23:58:50.68978885+08:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"Pattern Parser",
|
||||
"ParseBody"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/pattern_test.go",
|
||||
"LineNumber": 8
|
||||
},
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/pattern_test.go",
|
||||
"LineNumber": 25
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/pattern_test.go",
|
||||
"LineNumber": 26
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should parse the message body and extract data based on patterns",
|
||||
"State": "skipped",
|
||||
"StartTime": "2024-07-21T23:58:50.689798097+08:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
},
|
||||
{
|
||||
"ContainerHierarchyTexts": [
|
||||
"Pattern Parser",
|
||||
"ParseBody"
|
||||
],
|
||||
"ContainerHierarchyLocations": [
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/pattern_test.go",
|
||||
"LineNumber": 8
|
||||
},
|
||||
{
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/pattern_test.go",
|
||||
"LineNumber": 25
|
||||
}
|
||||
],
|
||||
"ContainerHierarchyLabels": [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"LeafNodeType": "It",
|
||||
"LeafNodeLocation": {
|
||||
"FileName": "/home/windy/project/airport/projects/new-telegram/caatsm/internal/parsers/pattern_test.go",
|
||||
"LineNumber": 37
|
||||
},
|
||||
"LeafNodeLabels": [],
|
||||
"LeafNodeText": "should return nil if no patterns match",
|
||||
"State": "skipped",
|
||||
"StartTime": "2024-07-21T23:58:50.689830232+08:00",
|
||||
"EndTime": "0001-01-01T00:00:00Z",
|
||||
"RunTime": 0,
|
||||
"ParallelProcess": 1,
|
||||
"NumAttempts": 0,
|
||||
"MaxFlakeAttempts": 0,
|
||||
"MaxMustPassRepeatedly": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user