[PATCH 30/42] test: Create a common function to get the config