test: Move the hostname logic to testinfra
test: Move the hostname logic to testinfra

This is part of the following pull request but needs to be
merged into master before that one will pass verify.

Closes #3178
Reviewed-by: Marius Vollmer <bb11c6e942c5cc765df5f04da146b3198127a7a3@redhat.com>

matobet/cockpit,moraleslazaro/cockpit,cockpituous/cockpit,cockpit-project/cockpit,garrett/cockpit,mareklibra/cockpit,stefwalter/cockpit,stefwalter/cockpit,sgallagher/cockpit,dperpeet/cockpit,Scribery/cockpit,xhad/cockpit,martinpitt/cockpit,arilivigni/cockpit,FireDrunk/cockpit,sgallagher/cockpit,larsu/cockpit,stefwalter/cockpit,xhad/cockpit,jscotka/cockpit,martinpitt/cockpit,harishanand95/cockpit,FireDrunk/cockpit,petervo/cockpit,vanloswang/cockpit,cockpituous/cockpit,andreasn/cockpit,mvollmer/cockpit,vanloswang/cockpit,andreasn/cockpit,petervo/cockpit,dperpeet/cockpit,andreasn/cockpit,dperpeet/cockpit,SotolitoLabs/cockpit,sgallagher/cockpit,larsu/cockpit,FireDrunk/cockpit,mareklibra/cockpit,cockpituous/cockpit,harishanand95/cockpit,michalskrivanek/cockpit,stefwalter/cockpit,larsu/cockpit,matobet/cockpit,martinpitt/cockpit,jscotka/cockpit,xhad/cockpit,michalskrivanek/cockpit,michalskrivanek/cockpit,dperpeet/cockpit,jscotka/cockpit,moraleslazaro/cockpit,garrett/cockpit,harishanand95/cockpit,matobet/cockpit,SotolitoLabs/cockpit,sgallagher/cockpit,vanloswang/cockpit,Scribery/cockpit,petervo/cockpit,dperpeet/cockpit,moraleslazaro/cockpit,stefwalter/cockpit,moraleslazaro/cockpit,dperpeet/cockpit,xhad/cockpit,SotolitoLabs/cockpit,sgallagher/cockpit,garrett/cockpit,jscotka/cockpit,mareklibra/cockpit,michalskrivanek/cockpit,harishanand95/cockpit,deryni/cockpit,michalskrivanek/cockpit,Scribery/cockpit,vanloswang/cockpit,cockpit-project/cockpit,sgallagher/cockpit,harishanand95/cockpit,larskarlitski/cockpit,cockpituous/cockpit,xhad/cockpit,arilivigni/cockpit,SotolitoLabs/cockpit,larskarlitski/cockpit,Scribery/cockpit,harishanand95/cockpit,garrett/cockpit,moraleslazaro/cockpit,vanloswang/cockpit,deryni/cockpit,deryni/cockpit,arilivigni/cockpit,mvollmer/cockpit,Scribery/cockpit,andreasn/cockpit,deryni/cockpit,cockpituous/cockpit,petervo/cockpit,xhad/cockpit,FireDrunk/cockpit,matobet/cockpit,Scribery/cockpit,sgallagher/cockpit,mvollmer/cockpit,jscotka/cockpit,deryni/cockpit,matobet/cockpit,mvollmer/cockpit,mareklibra/cockpit,matobet/cockpit,mareklibra/cockpit,moraleslazaro/cockpit,FireDrunk/cockpit,dperpeet/cockpit,larskarlitski/cockpit,deryni/cockpit,vanloswang/cockpit,arilivigni/cockpit,larsu/cockpit,larsu/cockpit,stefwalter/cockpit,deryni/cockpit,larskarlitski/cockpit,stefwalter/cockpit,michalskrivanek/cockpit,SotolitoLabs/cockpit,andreasn/cockpit,jscotka/cockpit,moraleslazaro/cockpit,larskarlitski/cockpit,mareklibra/cockpit,arilivigni/cockpit,cockpit-project/cockpit,vanloswang/cockpit,SotolitoLabs/cockpit,mvollmer/cockpit,garrett/cockpit,larskarlitski/cockpit,petervo/cockpit,petervo/cockpit,larsu/cockpit,harishanand95/cockpit,andreasn/cockpit,mareklibra/cockpit,cockpit-project/cockpit,cockpit-project/cockpit,andreasn/cockpit,larskarlitski/cockpit,arilivigni/cockpit,cockpituous/cockpit,SotolitoLabs/cockpit,arilivigni/cockpit,xhad/cockpit,martinpitt/cockpit,petervo/cockpit,michalskrivanek/cockpit,martinpitt/cockpit,Scribery/cockpit