dead battery

Had battery tested at parts store, they said it is good.
Got it on charge right now. Optima red top

gauge was showing 12V. but dropped while running.

I had led halo's installed. They have worked great for around 500 miles.
The actual lights won't turn on which makes me think it's the actual headlight switch. Especially since they flickered when I jiggled the switch and then went out completely.