postgres-operator/pkg
Raphael Torquato 26165be2d5
test: add unit tests for validate() and NewFromMap() functions (#3086)
This addresses issue #416 by adding comprehensive unit tests for the
config utility functions:

- TestValidate: Tests validation logic for MinInstances/MaxInstances,
  Workers count, ConnectionPooler instances, and user conflicts
- TestNewFromMap: Tests config creation from map with defaults,
  custom values, duration/boolean/map/slice parsing, and panic behavior
- TestMain: Sets OPERATOR_NAMESPACE env var for testing outside K8s

The tests cover both valid configurations and error cases.

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2026-06-02 10:45:44 +02:00
..
apis Add topologySpreadConstraints configuration to pod spec. (#2530) 2026-05-29 17:07:47 +02:00
apiserver Add operator deployment readiness probe (#1874) 2023-01-05 18:29:47 +01:00
cluster Fix deletion timestamp handling for clusters with finalizers (#3015) 2026-06-01 09:18:20 +02:00
controller Fix deletion timestamp handling for clusters with finalizers (#3015) 2026-06-01 09:18:20 +02:00
generated Regenerate code for 2026 header (#3029) 2026-01-09 15:38:16 +01:00
spec Generate CRD for postgresteam resource (#3004) 2026-01-10 19:39:08 +01:00
teams Generate CRD for postgresteam resource (#3004) 2026-01-10 19:39:08 +01:00
util test: add unit tests for validate() and NewFromMap() functions (#3086) 2026-06-02 10:45:44 +02:00