From c2eabedb9162d15d76e500a75e897039b8c66678 Mon Sep 17 00:00:00 2001 From: Tine Date: Fri, 24 May 2024 22:22:19 +0200 Subject: [PATCH] feat: using js as filter syntax --- internal/worker/activities/check.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/internal/worker/activities/check.go b/internal/worker/activities/check.go index 1dc0dc2..6dc09ab 100644 --- a/internal/worker/activities/check.go +++ b/internal/worker/activities/check.go @@ -6,13 +6,21 @@ import ( "github.com/mentos1386/zdravko/internal/temporal" "github.com/mentos1386/zdravko/pkg/k6" - _ "github.com/mentos1386/zdravko/pkg/k6/zdravko" + "github.com/mentos1386/zdravko/pkg/k6/zdravko" "github.com/mentos1386/zdravko/pkg/script" ) func (a *Activities) Check(ctx context.Context, param temporal.ActivityCheckParam) (*temporal.ActivityCheckResult, error) { execution := k6.NewExecution(slog.Default(), script.UnescapeString(param.Script)) + ctx = zdravko.WithZdravkoContext(ctx, zdravko.Context{ + Target: zdravko.Target{ + Name: param.Target.Name, + Group: param.Target.Group, + //Metadata: param.Target.Metadata, + }, + }) + result, err := execution.Run(ctx) if err != nil { return nil, err