From 02c5b1686a2d16f9751a3937ff1839966fc92ca6 Mon Sep 17 00:00:00 2001 From: Jorge Turrado Ferrero Date: Sun, 9 Feb 2025 00:08:40 +0100 Subject: [PATCH] chore: Improve azure pipelines e2e error messages (#6528) * chore: Improve azure pipelines e2e error messages Signed-off-by: Jorge Turrado * chore: Improve azure pipelines e2e error messages Signed-off-by: Jorge Turrado * chore: Improve azure pipelines e2e error messages Signed-off-by: Jorge Turrado * chore: Improve azure pipelines e2e error messages Signed-off-by: Jorge Turrado * . Signed-off-by: Jorge Turrado * . Signed-off-by: Jorge Turrado --------- Signed-off-by: Jorge Turrado --- tests/scalers/azure/azure_pipelines/azure_pipelines_test.go | 6 +++--- .../azure_pipelines_aad_wi/azure_pipelines_aad_wi_test.go | 6 +++--- .../azure/azure_pipelines_adv/azure_pipelines_adv_test.go | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/scalers/azure/azure_pipelines/azure_pipelines_test.go b/tests/scalers/azure/azure_pipelines/azure_pipelines_test.go index b8fe47135e1..88b81379864 100644 --- a/tests/scalers/azure/azure_pipelines/azure_pipelines_test.go +++ b/tests/scalers/azure/azure_pipelines/azure_pipelines_test.go @@ -198,7 +198,7 @@ func getAzDoPoolID(t *testing.T, connection *azuredevops.Connection) int { defer cancel() taskClient, err := taskagent.NewClient(ctx, connection) if err != nil { - t.Errorf("unable to create task agent client") + t.Error(fmt.Sprintf("unable to create task agent client: %s", err.Error()), err) } args := taskagent.GetAgentPoolsArgs{ PoolName: &poolName, @@ -215,7 +215,7 @@ func queueBuild(t *testing.T, connection *azuredevops.Connection) { defer cancel() buildClient, err := build.NewClient(ctx, connection) if err != nil { - t.Errorf("unable to create build client") + t.Error(fmt.Sprintf("unable to create build client: %s", err.Error()), err) } id, err := strconv.Atoi(buildID) if err != nil { @@ -240,7 +240,7 @@ func clearAllBuilds(t *testing.T, connection *azuredevops.Connection) { defer cancel() buildClient, err := build.NewClient(ctx, connection) if err != nil { - t.Errorf("unable to create build client") + t.Error(fmt.Sprintf("unable to create build client: %s", err.Error()), err) } var top = 20 args := build.GetBuildsArgs{ diff --git a/tests/scalers/azure/azure_pipelines_aad_wi/azure_pipelines_aad_wi_test.go b/tests/scalers/azure/azure_pipelines_aad_wi/azure_pipelines_aad_wi_test.go index f1db3b68871..d20a39a35e4 100644 --- a/tests/scalers/azure/azure_pipelines_aad_wi/azure_pipelines_aad_wi_test.go +++ b/tests/scalers/azure/azure_pipelines_aad_wi/azure_pipelines_aad_wi_test.go @@ -205,7 +205,7 @@ func getAzDoPoolID(t *testing.T, connection *azuredevops.Connection) int { defer cancel() taskClient, err := taskagent.NewClient(ctx, connection) if err != nil { - t.Errorf("unable to create task agent client") + t.Error(fmt.Sprintf("unable to create task agent client: %s", err.Error()), err) } args := taskagent.GetAgentPoolsArgs{ PoolName: &poolName, @@ -222,7 +222,7 @@ func queueBuild(t *testing.T, connection *azuredevops.Connection) { defer cancel() buildClient, err := build.NewClient(ctx, connection) if err != nil { - t.Errorf("unable to create build client") + t.Error(fmt.Sprintf("unable to create build client: %s", err.Error()), err) } id, err := strconv.Atoi(buildID) if err != nil { @@ -247,7 +247,7 @@ func clearAllBuilds(t *testing.T, connection *azuredevops.Connection) { defer cancel() buildClient, err := build.NewClient(ctx, connection) if err != nil { - t.Errorf("unable to create build client") + t.Error(fmt.Sprintf("unable to create build client: %s", err.Error()), err) } var top = 20 args := build.GetBuildsArgs{ diff --git a/tests/scalers/azure/azure_pipelines_adv/azure_pipelines_adv_test.go b/tests/scalers/azure/azure_pipelines_adv/azure_pipelines_adv_test.go index b970864eb37..5e21bbe5552 100644 --- a/tests/scalers/azure/azure_pipelines_adv/azure_pipelines_adv_test.go +++ b/tests/scalers/azure/azure_pipelines_adv/azure_pipelines_adv_test.go @@ -331,7 +331,7 @@ func getAzDoPoolID(t *testing.T, connection *azuredevops.Connection) int { defer cancel() taskClient, err := taskagent.NewClient(ctx, connection) if err != nil { - t.Errorf("unable to create task agent client") + t.Error(fmt.Sprintf("unable to create task agent client: %s", err.Error()), err) } args := taskagent.GetAgentPoolsArgs{ PoolName: &poolName, @@ -348,7 +348,7 @@ func queueBuild(t *testing.T, connection *azuredevops.Connection, bid int) { defer cancel() buildClient, err := build.NewClient(ctx, connection) if err != nil { - t.Errorf("unable to create build client") + t.Error(fmt.Sprintf("unable to create build client: %s", err.Error()), err) } args := build.QueueBuildArgs{ Project: &project, @@ -369,7 +369,7 @@ func clearAllBuilds(t *testing.T, connection *azuredevops.Connection) { defer cancel() buildClient, err := build.NewClient(ctx, connection) if err != nil { - t.Errorf("unable to create build client") + t.Error(fmt.Sprintf("unable to create build client: %s", err.Error()), err) } var top = 20 args := build.GetBuildsArgs{