From 6ca2cd8c79a1988eae464de1f4b465fc779372e9 Mon Sep 17 00:00:00 2001 From: Esteban Ricardo Mirizio Date: Wed, 28 Feb 2024 11:34:02 -0300 Subject: [PATCH] adding default use case --- cmd/policy.go | 6 ++++-- policy/controller_test.go | 38 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/cmd/policy.go b/cmd/policy.go index 4be2b1d7..d7fe1214 100644 --- a/cmd/policy.go +++ b/cmd/policy.go @@ -56,8 +56,10 @@ var controllerSubCmd = &cobra.Command{ // db is the databases to use // pump/sink are included only when needed defaults := policy.TestVariations{ - "pump": []string{"tykio/tyk-pump-docker-pub:v1.8", "$ECR/tyk-pump:master"}, - "sink": []string{"tykio/tyk-mdcb-docker:v2.4", "$ECR/tyk-sink:master"}, + params["job"] + "_conf": []string{"sha256"}, + params["job"] + "_db": []string{"mongo44", "postgres15"}, + "pump": []string{"tykio/tyk-pump-docker-pub:v1.8", "$ECR/tyk-pump:master"}, + "sink": []string{"tykio/tyk-mdcb-docker:v2.4", "$ECR/tyk-sink:master"}, } if err := params.SetVariations(&op, defaults); err != nil { return err diff --git a/policy/controller_test.go b/policy/controller_test.go index 78e0f6ca..daa8d473 100644 --- a/policy/controller_test.go +++ b/policy/controller_test.go @@ -94,6 +94,38 @@ EOF baseRef: "refs/heads/main", }, { + job: "ui", + want: `versions<