MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / checkArchiveMode

Function checkArchiveMode

pkg/postgres/configuration_fuzz_test.go:107–119  ·  view source on GitHub ↗
(t *testing.T, cfg *PgConfiguration, isWalArchivingDisabled, isReplicaCluster bool)

Source from the content-addressed store, hash-verified

105}
106
107func 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
121func checkAlterSystem(
122 t *testing.T,

Calls 1

GetConfigMethod · 0.80

Tested by

no test coverage detected