diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-07 04:48:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-07 04:48:35 +0000 |
commit | 207df6fc406e81bfeebdff7f404bd242ff3f099f (patch) | |
tree | a1a796b056909dd0a04ffec163db9363a8757808 /test/bad-config | |
parent | Releasing progress-linux version 0.11.2-1~progress7.99u1. (diff) | |
download | lnav-207df6fc406e81bfeebdff7f404bd242ff3f099f.tar.xz lnav-207df6fc406e81bfeebdff7f404bd242ff3f099f.zip |
Merging upstream version 0.12.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
4 files changed, 93 insertions, 0 deletions
diff --git a/test/bad-config/formats/invalid-file-format/format.json b/test/bad-config/formats/invalid-file-format/format.json new file mode 100644 index 0000000..cca2b47 --- /dev/null +++ b/test/bad-config/formats/invalid-file-format/format.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://lnav.org/schemas/format-v1.schema.json", + "bad_file_format1": { + "title": "bad file format", + "regex": { + "std": { + "pattern": "(?<timestamp>\\d+): (?<body>.*)$" + } + }, + "converter": { + "header": { + "expr": { + "default": ":header REGEXP 'foobar" + }, + "size": 8 + } + }, + "timestamp-format": [ + "%i" + ], + "sample": [ + { + "line": "1234: abcd" + } + ] + } +}
\ No newline at end of file diff --git a/test/bad-config/formats/invalid-no-tscap/format.json b/test/bad-config/formats/invalid-no-tscap/format.json new file mode 100644 index 0000000..5e8eb14 --- /dev/null +++ b/test/bad-config/formats/invalid-no-tscap/format.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://lnav.org/schemas/format-v1.schema.json", + "no_tscap_log": { + "title": "Sample with no captured timestamp", + "multiline": true, + "ordered-by-time": false, + "regex": { + "std": { + "pattern": "^(?<container>[\\w-]+)\\s+\\|( (?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{9}[+-]\\d{2}:\\d{2}))?( (?<body>.*))?$" + } + }, + "level-field": "timestamp", + "module-field": "container", + "value": { + "container": { + "kind": "string", + "identifier": true + } + }, + "sample": [ + { + "line": "gitea | 2023-09-24T22:15:55.346526305+02:00 2023/09/24 22:15:55 cmd/web.go:223:runWeb() [I] Starting Gitea on PID: 7" + }, + { + "line": "gitea | 2023/09/24 22:15:55 cmd/web.go:223:runWeb() [I] Starting Gitea on PID: 7" + }, + { + "line": "gitea-db-1 | 2023-09-24T22:15:37.981051393+02:00 [migrations] started" + } + ] + } +}
\ No newline at end of file diff --git a/test/bad-config2/configs/invalid-annotation/config.json b/test/bad-config2/configs/invalid-annotation/config.json new file mode 100644 index 0000000..9fae7de --- /dev/null +++ b/test/bad-config2/configs/invalid-annotation/config.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://lnav.org/schemas/config-v1.schema.json", + "log": { + "annotations": { + "org.lnav.test.no-handler": { + "description": "annotation without a handler" + }, + "org.lnav.test.no-condition": { + "description": "annotation without a condition", + "handler": "my-handler" + } + } + } +}
\ No newline at end of file diff --git a/test/bad-config2/configs/invalid-theme/config.json b/test/bad-config2/configs/invalid-theme/config.json new file mode 100644 index 0000000..cfbeda5 --- /dev/null +++ b/test/bad-config2/configs/invalid-theme/config.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://lnav.org/schemas/config-v1.schema.json", + "ui": { + "theme-defs": { + "invalid-theme": { + "styles": { + "text": { + "color": "InvalidColor", + "bad-property": "abc" + } + }, + "highlights": { + "foobar": { + "pattern": "abc(" + } + } + } + } + } +}
\ No newline at end of file |