Allow for a more generic optional repository testing. Closes #402.