[core#19724 5/9][test] Add explicit tests that connection types get set correctly
[core#19724 5/9][test] Add explicit tests that connection types get set correctly

Summary:
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/19724 | core#19724]] [5/9]
https://github.com/bitcoin/bitcoin/pull/19724/commits/da3a0be61b025224231206cb4656e420453bfdeb

Depends on D9773

Test Plan: `ninja check`

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D9774

Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc