Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions internal/controller/postgrescluster/apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ func TestServerSideApply(t *testing.T) {
MatchLabels: map[string]string{"select": name},
}
sts.Spec.Template.Labels = map[string]string{"select": name}
sts.Spec.Template.Spec.Containers = []corev1.Container{{Name: "test", Image: "test"}}
return &sts
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ func TestManageControllerRefs(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{"label1": "val1"},
},
Spec: corev1.PodSpec{
Containers: []corev1.Container{{Name: "test", Image: "test"}},
},
},
},
}
Expand Down
12 changes: 9 additions & 3 deletions internal/controller/postgrescluster/pgbackrest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1707,7 +1707,9 @@ func TestGetPGBackRestResources(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{
Labels: naming.PGBackRestDedicatedLabels(clusterName),
},
Spec: corev1.PodSpec{},
Spec: corev1.PodSpec{
Containers: []corev1.Container{{Name: "test", Image: "test"}},
},
},
},
},
Expand Down Expand Up @@ -1745,7 +1747,9 @@ func TestGetPGBackRestResources(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{
Labels: naming.PGBackRestDedicatedLabels(clusterName),
},
Spec: corev1.PodSpec{},
Spec: corev1.PodSpec{
Containers: []corev1.Container{{Name: "test", Image: "test"}},
},
},
},
},
Expand Down Expand Up @@ -1781,7 +1785,9 @@ func TestGetPGBackRestResources(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{
Labels: naming.PGBackRestDedicatedLabels(clusterName),
},
Spec: corev1.PodSpec{},
Spec: corev1.PodSpec{
Containers: []corev1.Container{{Name: "test", Image: "test"}},
},
},
},
},
Expand Down
4 changes: 3 additions & 1 deletion internal/controller/standalone_pgadmin/statefulset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func TestReconcilePGAdminStatefulSet(t *testing.T) {
pgadmin := new(v1beta1.PGAdmin)
pgadmin.Name = "test-standalone-pgadmin"
pgadmin.Namespace = ns.Name
pgadmin.Spec.Image = initialize.String("test")
require.UnmarshalInto(t, &pgadmin.Spec, `{
dataVolumeClaimSpec: {
accessModes: [ReadWriteOnce],
Expand Down Expand Up @@ -113,6 +114,7 @@ terminationGracePeriodSeconds: 30
// add pod level customizations
custompgadmin.Name = "custom-pgadmin"
custompgadmin.Namespace = ns.Name
custompgadmin.Spec.Image = initialize.String("test")
require.UnmarshalInto(t, &custompgadmin.Spec, `{
dataVolumeClaimSpec: {
accessModes: [ReadWriteOnce],
Expand Down Expand Up @@ -231,7 +233,7 @@ tolerations:
// add pod level customizations
custompgadmin.Name = "custom-volumes"
custompgadmin.Namespace = ns.Name

custompgadmin.Spec.Image = initialize.String("test")
require.UnmarshalInto(t, &custompgadmin.Spec, `{
dataVolumeClaimSpec: {
accessModes: [ReadWriteOnce],
Expand Down
Loading