2 different servers running the same Discourse instance?

For the purpose you described it is actually much easier to just restore the backup of your production site on your test server, periodically or on demand.