Unit test failing on validate docker image to AI Process
Description
PRDE - Story default text according to the team DoR (Definition of Ready)
01 - PERSON OF CONTACT (PERSON THAT CAN ANSWER QUESTIONS ABOUT THE PROBLEM):
@Renan Schroeder
02 - STORY BRIEFING (AS A < PERSONA >, I [WANT TO] < NEED >, [SO THAT] < GOAL >):
03 - PROBLEM (WHAT'S THE CURRENT PROBLEM SCENARIO OR PAIN TO BE RESOLVED?):
After some behavior change with git connection using JGit java library, with an invalid git repository URL, the unit test DockerBuildTaskProcessorTest.validateGitAndDockerInfo_invalid_gitRepoUrl_value
is now failing and not throwing the expected exception: gitRepoUrl is not a valid git repository
.
The reason is that a new exception being thrown during git connection with a wrong repository URL:org.eclipse.jgit.api.errors.TransportException: https://invalidgithub.com/totvslabs/carolapp-samples: Redirection blocked: redirect https://invalidgithub.com/totvslabs/carolapp-samples/ -> http://ww1.invalidgithub.com not allowed
and the method wrapTransportException
, responsible for handle with the TransportException variations and translate with a structured response, is not prepared to handle this.
04 - GOAL (DESCRIBE THE PROPOSED SOLUTION):
Fix the method wrapTransportException
to ensure proper handling of the exception message{{org.eclipse.jgit.api.errors.TransportException: https://invalidgithub.com/totvslabs/carolapp-samples: Redirection blocked: redirect https://invalidgithub.com/totvslabs/carolapp-samples/ -> http://ww1.invalidgithub.com not allowed}}
and ensure the validation on the git repository url to normalize the unit test result:
exception{{DockerBuildTaskProcessorTest.validateGitAndDockerInfo_invalid_gitRepoUrl_value}} continue failing:
05 - WHO CAN USE THIS FEATURE (USER ROLES):
06 - ACTIVITY DIAGRAM (ACTIVITY DIAGRAM LINK AND IMAGE):
07 - STEPS (ACTIONS TO BE PERFORMED LINKING TO SCREENSHOTS):
08 - ALTERNATIVE STEPS:
09 - ASSETS (FIGMA LINKS, RELEVANT DOCUMENTATION LINKS, JSON EXAMPLES, ETC):
10 - ACCEPTANCE CRITERIA:
- Back to pass unit test
DockerBuildTaskProcessorTest.validateGitAndDockerInfo_invalid_gitRepoUrl_value