tests: Fix some unused variable errors in non-p2p builds
tests: Fix some unused variable errors in non-p2p builds

Closes: #1745
Approved by: alexlarsson

flatpak/flatpak,flatpak/flatpak,flatpak/flatpak,matthiasclasen/flatpak,matthiasclasen/flatpak,flatpak/flatpak,flatpak/flatpak,matthiasclasen/flatpak,matthiasclasen/flatpak,matthiasclasen/flatpak