Test if PostgreSQL connections for pg_hba.conf use CIDR notation
[ Context ]
PostgreSQL doesn't accept "127.0.0.1" anymore in pg_hba.conf, as
it accepts two notation, IP range or "ip-address ip-mask".
To represent the "127.0.0.1" address, two notations are valid:
"127.0.0.1/32" or "127.0.0.1 255.255.255.255".
Nasqueron configuration uses the CIDR notation format.
[ Test suite for connections ]
- Check all mandatory keys are there
- Check no unknown key is there (would be ignored by our template)
- Check the ips parameter is a CIDR range (contains "/")
Reference: https://www.postgresql.org/docs/17/auth-pg-hba-conf.html
Test Plan:
- New tests pass for current configuration
- Tests fail for "ips: 127.0.0.1"
- Tests fail if we mess with the keys
- DNS test still pass
Differential Revision: https://devcentral.nasqueron.org/D3878