1
0
mirror of https://github.com/quay/quay.git synced 2026-01-26 06:21:37 +03:00
Files
quay/config-tool/pkg/lib/fieldgroups/database
Michaela Lang 2c24975dbb federationuser(ldap): fixing keepalive settings for LDAP connections (PROJQUAY-5137) (#2440)
fixed field names for keepalive attributes.

* scenario1: config-tool empty configuration
** expectation: empty config for DB_CONNECTION_ARGS
```
$ curl -s http://localhost/api/v1/config | jq -r '."config.yaml".DB_CONNECTION_ARGS'
{}
```

* scenario2: config-tool with populated DB_CONNECTION_ARGS
** expectation: values are returned in DB_CONNECTION_ARGS
```
$ curl -s http://localhost/api/v1/config | jq -r '."config.yaml".DB_CONNECTION_ARGS'
{
  "autorollback": true,
  "keepalives": 1,
  "keepalives_count": 5,
  "keepalives_idle": 3,
  "keepalives_interval": 4,
  "max_connections": 30,
  "sslcompression": 1,
  "stale_timeout": 300,
  "tcp_user_timeout": 1000
}
```

* scenario3: config-tool with populated DB_CONNECTION_ARGS wrong type
** expectation: config-tool validate will bailout the wrong type in the
parameter
```
$ podman run -ti --rm --name config-tool -v config.yaml:/tmp/config.yaml config-tool:latest validate --configDir /tmp -m online
FATA[0000] An error occurred during validation. Process could not marshal config.yaml. This is most likely due to an incorrect type.
More info: keepalives must be of type int
```
2023-11-07 16:58:30 +01:00
..