common/archive: Fix origin metadata functions after indexer API changes
Those breaking changes were missed as related tests use mocking.
Also improve the tests by removing mocking as much as possible.
Closes #2739 (closed)
Migrated from D4380 (view on Phabricator)