In order to integration-test T278962: Allow redirects and the target article as independent sitelinks if redirect badge is used (ideally using API integration tests), we need the test wiki in Wikibase CI jobs to be able to link to itself. Currently, this is not possible: the wiki must first be added to its own sites table, using a group that is then added to the $wgWBRepoSettings['siteLinkGroups'] array in its LocalSettings.php.
This would also be useful for browser tests (I think we currently don’t have any browser tests for sitelink behavior?), so I wouldn’t restrict this to the api-testing jobs.