From 66a4de0d6f48f0a73d496dc44f13d0050f29e971 Mon Sep 17 00:00:00 2001
From: Simon Grosz <simon.grosz.ext@orange.com>
Date: Tue, 20 Feb 2024 10:36:47 +0100
Subject: [PATCH] fix: go-test job failure when go_text_report file is too big

Signed-off-by: Simon Grosz <simon.grosz.ext@orange.com>
---
 templates/gitlab-ci-golang.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/gitlab-ci-golang.yml b/templates/gitlab-ci-golang.yml
index 7f27199..690e85d 100644
--- a/templates/gitlab-ci-golang.yml
+++ b/templates/gitlab-ci-golang.yml
@@ -404,7 +404,7 @@ stages:
     set -e
 
     # dump text report in the console
-    cat "$go_text_report"
+    cat "$go_text_report" || (echo "Display of go test report file failed; Display of last 100 lines." && tail -n100 "$go_text_report") 
 
     # compute and dump code coverage in the console
     output_coverage
-- 
GitLab