That's how it should look.My goodness! He was lucky, wasn't he?
Can you tell us which test paper? Cite it properly please. If possible, provide a link.This is from a test paper
The first, in the form of as a question tag, looks more natural to me.My goodness! He was lucky, wasn't he?
Or:
My goodness, he was lucky! Wasn't he?
If you have a question about the English language and would like to ask one of our many English teachers and language experts, please click the button below to let us know: