MCPcopy Index your code
hub / github.com/zalando/postgres-operator / patchPostgresqlStreams

Function patchPostgresqlStreams

pkg/cluster/streams_test.go:770–786  ·  view source on GitHub ↗
(t *testing.T, cluster *Cluster, pgSpec *acidv1.PostgresSpec, listOptions metav1.ListOptions)

Source from the content-addressed store, hash-verified

768}
769
770func patchPostgresqlStreams(t *testing.T, cluster *Cluster, pgSpec *acidv1.PostgresSpec, listOptions metav1.ListOptions) (streams *zalandov1.FabricEventStreamList) {
771 patchData, err := specPatch(pgSpec)
772 assert.NoError(t, err)
773
774 pgPatched, err := cluster.KubeClient.Postgresqls(namespace).Patch(
775 context.TODO(), cluster.Name, types.MergePatchType, patchData, metav1.PatchOptions{}, "spec")
776 assert.NoError(t, err)
777
778 cluster.Postgresql.Spec = pgPatched.Spec
779 err = cluster.syncStream(appId)
780 assert.NoError(t, err)
781
782 streams, err = cluster.KubeClient.FabricEventStreams(namespace).List(context.TODO(), listOptions)
783 assert.NoError(t, err)
784
785 return streams
786}
787
788func TestDeleteStreams(t *testing.T) {
789 pg.Name = fmt.Sprintf("%s-4", pg.Name)

Callers 2

TestUpdateStreamsFunction · 0.85
TestDeleteStreamsFunction · 0.85

Calls 6

specPatchFunction · 0.85
syncStreamMethod · 0.80
PatchMethod · 0.65
PostgresqlsMethod · 0.65
ListMethod · 0.65
FabricEventStreamsMethod · 0.65

Tested by

no test coverage detected