From d2f5901dbae0540a5ce3ebd022d7fb11d7708530 Mon Sep 17 00:00:00 2001 From: Leandro Poroli Date: Fri, 27 Sep 2024 14:13:09 -0300 Subject: [PATCH] unit tests update --- kontrol-service/engine/flow/dev_flow_test.go | 16 ++++++++-------- kontrol-service/engine/flow/render.go | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/kontrol-service/engine/flow/dev_flow_test.go b/kontrol-service/engine/flow/dev_flow_test.go index 45504e9..40e8a50 100644 --- a/kontrol-service/engine/flow/dev_flow_test.go +++ b/kontrol-service/engine/flow/dev_flow_test.go @@ -710,8 +710,8 @@ func TestDevFlowImmutability(t *testing.T) { FlowId: "dev-flow-1", ServicePatches: []flow_spec.ServicePatch{ { - Service: "checkoutservice", - DeploymentSpec: checkoutservice.DeploymentSpec, + Service: "checkoutservice", + Image: checkoutservice.DeploymentSpec.Template.Spec.Containers[0].Image, }, }, } @@ -761,8 +761,8 @@ func TestFlowMerging(t *testing.T) { FlowId: "dev-flow-1", ServicePatches: []flow_spec.ServicePatch{ { - Service: "checkoutservice", - DeploymentSpec: checkoutservice.DeploymentSpec, + Service: "checkoutservice", + Image: checkoutservice.DeploymentSpec.Template.Spec.Containers[0].Image, }, }, } @@ -800,8 +800,8 @@ func TestExternalServicesFlowOnDependentService(t *testing.T) { FlowId: "dev-flow-1", ServicePatches: []flow_spec.ServicePatch{ { - Service: "cartservice", - DeploymentSpec: cartservice.DeploymentSpec, + Service: "cartservice", + Image: cartservice.DeploymentSpec.Template.Spec.Containers[0].Image, }, }, } @@ -833,8 +833,8 @@ func TestExternalServicesCreateDevFlowOnNotDependentService(t *testing.T) { FlowId: "dev-flow-1", ServicePatches: []flow_spec.ServicePatch{ { - Service: "frontend", - DeploymentSpec: frontend.DeploymentSpec, + Service: "frontend", + Image: frontend.DeploymentSpec.Template.Spec.Containers[0].Image, }, }, } diff --git a/kontrol-service/engine/flow/render.go b/kontrol-service/engine/flow/render.go index 6646776..9c072ae 100644 --- a/kontrol-service/engine/flow/render.go +++ b/kontrol-service/engine/flow/render.go @@ -882,7 +882,7 @@ func generateDynamicLuaScript(allServices []*resolved.Service, flowId string, na service = fallbackService } if service == nil { - logrus.Errorf("No service found for '%s' for version '%s' or baseline '%s'. No routing can configured.", serviceID, flowId, &baselineFlowVersion) + logrus.Errorf("No service found for '%s' for version '%s' or baseline '%s'. No routing can configured.", serviceID, flowId, baselineFlowVersion) continue }