Fix validate pipeline job
What does this MR do and why?
During the review cycle of !2379 (merged) we refactored a variable but we missed another usage down in the same function.
This merge request fixes the unexisting variable error as well as introduces tests for the class.
Author Check-list
-
Has documentation been updated?
Edited by Alessio Caiazza