From 0b4030905b0e6342c2140cd4ac9dc93acf86253a Mon Sep 17 00:00:00 2001 From: ppom Date: Fri, 9 Feb 2024 12:00:00 +0100 Subject: [PATCH] ignoreregex test --- config/test.jsonnet | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/config/test.jsonnet b/config/test.jsonnet index 63f6b96..f9ff43b 100644 --- a/config/test.jsonnet +++ b/config/test.jsonnet @@ -2,24 +2,14 @@ patterns: { num: { regex: '[0-9]+', + ignore: ['1'], + ignoreregex: ['2.?'], }, }, - start: [ - ['err'], - ['sleep', '1'], - ], - - stop: [ - ['sleep', '1'], - // ['false'], - ['true'], - ], - streams: { tailDown1: { - cmd: ['sh', '-c', "echo 1 2 3 4 5 5 | tr ' ' '\n' | while read i; do sleep 1; echo found $(($i % 10)); done"], - // cmd: ['sh', '-c', "echo 1 2 3 4 5 1 2 3 4 5 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 | tr ' ' '\n' | while read i; do sleep 2; echo found $(($i % 10)); done"], + cmd: ['sh', '-c', "echo 1 2 3 4 5 11 12 21 22 33 | tr ' ' '\n' | while read i; do sleep 1; echo found $i; done"], filters: { findIP: { regex: ['^found $'], @@ -38,25 +28,5 @@ }, }, }, - // tailDown2: { - // cmd: ['sh', '-c', 'echo coucou; sleep 2m'], - // filters: { - // findIP: { - // regex: ['^found $'], - // retry: 3, - // retryperiod: '30s', - // actions: { - // damn: { - // cmd: ['echo', ''], - // }, - // undamn: { - // cmd: ['echo', 'undamn', ''], - // after: '30s', - // onexit: true, - // }, - // }, - // }, - // }, - // }, }, }