Issue #923 Factor out repo creation in test