Some basic review — what is a shit test? The common definition is when a woman does something shitty to a man to see if he will put up with it. If he does, she thinks less of him. If he doesn’t, he rises in esteem from her perspective.
In real life, there are sometimes situations where there is a choice between doing what is truly right, or maybe doing something that is less right, but might be easier. Sometimes this means standing up to somebody who is in the wrong, but might have some measure of power over you.
Through experience (work and otherwise), I have found that doing the more right action can increase respect in the eyes of all who see the action. Still there might be a price to be paid (or sometimes not) for that action, but still the enhanced respect is there. This often pays dividends in the long run. It is as if the world throws shit tests your way, daring you to pass them. Furthermore, lots of people get to see (or at least hear about) your response to them.
Naturally enough, you need to choose how you respond. If your job is on the line, you might take the easier approach. Or maybe not.
Exit question: Do people realize that they are testing other people, or does it happen without thinking?