Gelman makes a distinction between p-hacking and choosing the test based on your data.
p-hacking is confirming your preferred hypothesis - just try again.
the latter let's you write a paper.
(test power is different: if there's really an effect, would you detect it)