Fixes #7329 - Correctly validate HostConfigGroup

@tbrisker, can you split this test into two test? One for valid, and one for invalid. Also, I would use `assert_difference` instead of `assert_nothing_raised`