It is impossible for the player character to fail the test. Unlike other settlements around the Commonwealth, Covenant is surrounded by tall concrete walls sprinkled with defensive turrets, and the houses and the yard are in pristine condition. The Sole Survivor even mentions how everything looks almost pre-War.
If the original inhabitants of Covenant have been killed, any remaining turrets in Covenant will be hostile towards new turrets, the player character and hostiles.
In order to take the settlement, everyone must be killed, except Dora and Deezer. If the Sole Survivor decides to side with Covenant and completes the quest with dialogue options, then the town will allow the Sole Survivor to join without any conflict. Speak to Jacob Orden to obtain access to the workshop.
If you destroy the institute, the covenant quest chain no longer starts. You need to acquire the settlement earlier in the game.
The Institute may do wrong, but they have the resources to literally rebuild what was lost in much less time than any other existing faction. If you destroy that, you could set back humanity's progress by a huge amount, if not destroy it's chances of ever recovering from the Great War.
Inside Covenant, players can find a few things that raise suspicions, like an abandoned bed roll, a note that talks about the rules of Covenant and how not to talk about Synths, and self-help books. Yet, none of this leads to concrete evidence of the fate of the caravan's survivors, or Covenant's involvement.
Visitors to Covenant are subjected to a psychological test, called the SAFE test.
In order to take the settlement, everyone must be killed, except Dora and Deezer. If the Sole Survivor decides to side with Covenant and completes the quest with dialogue options, then the town will allow the Sole Survivor to join without any conflict. Speak to Jacob Orden to obtain access to the workshop.