From f210e1a7a6650545911c5aec9be6341610a959e3 Mon Sep 17 00:00:00 2001 From: Mustafa Abdelrahman Date: Fri, 16 Jun 2023 15:55:59 +0200 Subject: [PATCH] prepare exppected value in one place Signed-off-by: Mustafa Abdelrahman --- worker_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worker_test.go b/worker_test.go index 227067f5..c53502ba 100644 --- a/worker_test.go +++ b/worker_test.go @@ -412,7 +412,7 @@ func TestResourceConversion(tt *testing.T) { tt.Run(scenario.name, func(t *testing.T) { b, err := os.ReadFile("./testdata/" + scenario.name + "/expected.cf") require.NoError(t, err) - expected := string(b) + expected := strings.TrimSuffix(string(b), "\n") clientEC2 := &fake.EC2Client{Outputs: scenario.responsesEC2} clientASG := &fake.ASGClient{Outputs: scenario.responsesASG} @@ -478,7 +478,7 @@ func TestResourceConversion(tt *testing.T) { assert.Equal( t, - strings.TrimSuffix(expected, "\n"), + expected, clientCF.GetLastGeneratedTemplate(), ) })