I remember watching an episode from "The Outer Limits" (the new series) in the late 1990s. It was about a spaceship from Earth, heading towards an alien planet. The spaceship carried a powerful weapon that was going to be used to destroy the alien homeworld. During the voyage, the aliens intercepted the ship, boarded it, and interrogated each of the crew members individually.
Near the end of the episode, a doorway appeared out of nowhere, which confused all of the crew members. Men in military uniforms walked through the doorway onto the ship, and told the crew members that it had all been a simulation - they wanted to test the crew members to see how they would react if the aliens really did hijack the ship. They were all still on Earth.
Then one of the crew members panicked and said that just prior to the doorway appearing, she had activated the weapon's self-destruct sequence. The general or commander who walked in said that was impossible because they put several layers of safeguards in place. The crew member said she was the engineer who put in all the safeguards, so she knew how to bypass all of them. The episode ended with the Earth exploding.
I found an episode called "The Light Brigade", which sounds very similar to the episode I described. Was that the episode, or was it a different episode?