(t *testing.T, cfg *PgConfiguration, isWalArchivingDisabled, isReplicaCluster bool)
| 105 | } |
| 106 | |
| 107 | func checkArchiveMode(t *testing.T, cfg *PgConfiguration, isWalArchivingDisabled, isReplicaCluster bool) { |
| 108 | t.Helper() |
| 109 | want := "on" |
| 110 | switch { |
| 111 | case isWalArchivingDisabled: |
| 112 | want = "off" |
| 113 | case isReplicaCluster: |
| 114 | want = "always" |
| 115 | } |
| 116 | if got := cfg.GetConfig("archive_mode"); got != want { |
| 117 | t.Fatalf("archive_mode mismatch: got %q want %q", got, want) |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | func checkAlterSystem( |
| 122 | t *testing.T, |
no test coverage detected