test: Check for cmd before appending
test: Check for cmd before appending

Closes #3707
Reviewed-by: Stef Walter <8a7fbf0f15d3ad982af54ef28f5c117d2494b76c@redhat.com>

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