test-lib: add helper functions for config