(t *testing.T)
| 11 | ) |
| 12 | |
| 13 | func TestNewParameters(t *testing.T) { |
| 14 | parameters := NewParameters() |
| 15 | |
| 16 | assert.DeepEqual(t, parameters.Mandatory.AsMap(), map[string]string{ |
| 17 | "log_file_mode": "0660", |
| 18 | |
| 19 | "ssl": "on", |
| 20 | "ssl_ca_file": "/pgconf/tls/ca.crt", |
| 21 | "ssl_cert_file": "/pgconf/tls/tls.crt", |
| 22 | "ssl_key_file": "/pgconf/tls/tls.key", |
| 23 | |
| 24 | "unix_socket_directories": "/tmp/postgres", |
| 25 | |
| 26 | "wal_level": "logical", |
| 27 | }) |
| 28 | //nolint:gosec // G101: "password_encryption" is a PostgreSQL parameter name, not a credential. |
| 29 | assert.DeepEqual(t, parameters.Default.AsMap(), map[string]string{ |
| 30 | "jit": "off", |
| 31 | |
| 32 | "log_directory": "/pgdata/logs/postgres", |
| 33 | "password_encryption": "scram-sha-256", |
| 34 | }) |
| 35 | } |
| 36 | |
| 37 | func TestParameterSet(t *testing.T) { |
| 38 | t.Run("NilAsMap", func(t *testing.T) { |
nothing calls this directly
no test coverage detected