At the headlight?
One of the terminals is the ground.
The only way for voltage to be at the ground is (a) if the headlight ground wire is disconnected, or (b) a cross wire short.
With (a) you test light provides the connection to ground. In doing so the headlight should have also glowed.