MCPcopy Create free account
hub / github.com/CrunchyData/postgres-operator / TestInstanceConfigFiles

Function TestInstanceConfigFiles

internal/patroni/config_test.go:542–562  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

540}
541
542func TestInstanceConfigFiles(t *testing.T) {
543 t.Parallel()
544
545 cm1 := &corev1.ConfigMap{ObjectMeta: metav1.ObjectMeta{Name: "cm1"}}
546 cm2 := &corev1.ConfigMap{ObjectMeta: metav1.ObjectMeta{Name: "cm2"}}
547
548 projections := instanceConfigFiles(cm1, cm2)
549
550 assert.Assert(t, cmp.MarshalMatches(projections, `
551- configMap:
552 items:
553 - key: patroni.yaml
554 path: ~postgres-operator_cluster.yaml
555 name: cm1
556- configMap:
557 items:
558 - key: patroni.yaml
559 path: ~postgres-operator_instance.yaml
560 name: cm2
561 `))
562}
563
564func TestInstanceEnvironment(t *testing.T) {
565 t.Parallel()

Callers

nothing calls this directly

Calls 2

MarshalMatchesFunction · 0.92
instanceConfigFilesFunction · 0.85

Tested by

no test coverage detected