Properly move origin-enabled check into init()

As a result, remove the `testing` struct, and make it
a function that potentially returns an error which we
then respond to in init().