move testing portion of configapivars to own function