For #19989, make sudo tests backwards compatible with earlier versions o...

...f shotgun.