From 3c33bdea5dd4d16085be0f305868795a9b978564 Mon Sep 17 00:00:00 2001 From: Narek Hovhannisyan Date: Tue, 9 Jul 2024 19:10:24 +0400 Subject: [PATCH] fix(builtins): validate duration to be gt 0 in mock observations --- src/if-run/builtins/mock-observations/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/if-run/builtins/mock-observations/index.ts b/src/if-run/builtins/mock-observations/index.ts index d947e7d7c..ab090d7c8 100644 --- a/src/if-run/builtins/mock-observations/index.ts +++ b/src/if-run/builtins/mock-observations/index.ts @@ -55,7 +55,7 @@ export const MockObservations = (globalConfig: ConfigParams): ExecutePlugin => { const schema = z.object({ 'timestamp-from': z.string(), 'timestamp-to': z.string(), - duration: z.number(), + duration: z.number().gt(0), components: z.array(z.record(z.string())), generators: z.object({ common: z.record(z.string().or(z.number())),