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

Function updateTablespaceOwner

tests/e2e/tablespaces_test.go:919–928  ·  view source on GitHub ↗
(cluster *apiv1.Cluster, tablespaceName, newOwner string)

Source from the content-addressed store, hash-verified

917}
918
919func updateTablespaceOwner(cluster *apiv1.Cluster, tablespaceName, newOwner string) {
920 updated := cluster.DeepCopy()
921 for idx, value := range updated.Spec.Tablespaces {
922 if value.Name == tablespaceName {
923 updated.Spec.Tablespaces[idx].Owner.Name = newOwner
924 }
925 }
926 err := env.Client.Patch(env.Ctx, updated, client.MergeFrom(cluster))
927 Expect(err).ToNot(HaveOccurred())
928}
929
930func AssertRoleReconciled(
931 namespace, clusterName,

Callers 1

Calls 2

DeepCopyMethod · 0.45
PatchMethod · 0.45

Tested by

no test coverage detected