@@ -683,9 +683,11 @@ var _ = Describe("ReconcilePostgres", func() {
683
683
// customers schema
684
684
pg .EXPECT ().CreateSchema (name , name + "-group" , "customers" , gomock .Any ()).Return (nil ).Times (1 )
685
685
pg .EXPECT ().SetSchemaPrivileges (name , name + "-group" , gomock .Any (), "customers" , gomock .Any (), gomock .Any ()).Return (nil ).Times (2 )
686
+ pg .EXPECT ().SetSchemaPrivilegesCreate (name , name + "-group" , name + "-writer" , "customers" , gomock .Any (), gomock .Any ()).Return (nil ).Times (1 )
686
687
// stores schema
687
688
pg .EXPECT ().CreateSchema (name , name + "-group" , "stores" , gomock .Any ()).Return (nil ).Times (1 )
688
689
pg .EXPECT ().SetSchemaPrivileges (name , name + "-group" , gomock .Any (), "stores" , gomock .Any (), gomock .Any ()).Return (nil ).Times (2 )
690
+ pg .EXPECT ().SetSchemaPrivilegesCreate (name , name + "-group" , name + "-writer" , "stores" , gomock .Any (), gomock .Any ()).Return (nil ).Times (1 )
689
691
})
690
692
691
693
It ("should update status" , func () {
@@ -708,9 +710,11 @@ var _ = Describe("ReconcilePostgres", func() {
708
710
// customers schema errors
709
711
pg .EXPECT ().CreateSchema (name , name + "-group" , "customers" , gomock .Any ()).Return (fmt .Errorf ("Could not create schema" )).Times (1 )
710
712
pg .EXPECT ().SetSchemaPrivileges (name , name + "-group" , gomock .Any (), "customers" , gomock .Any (), gomock .Any ()).Return (nil ).Times (0 )
713
+ pg .EXPECT ().SetSchemaPrivilegesCreate (name , name + "-group" , name + "-writer" , "customers" , gomock .Any (), gomock .Any ()).Return (nil ).Times (0 )
711
714
// stores schema
712
715
pg .EXPECT ().CreateSchema (name , name + "-group" , "stores" , gomock .Any ()).Return (nil ).Times (1 )
713
716
pg .EXPECT ().SetSchemaPrivileges (name , name + "-group" , gomock .Any (), "stores" , gomock .Any (), gomock .Any ()).Return (nil ).Times (2 )
717
+ pg .EXPECT ().SetSchemaPrivilegesCreate (name , name + "-group" , name + "-writer" , "stores" , gomock .Any (), gomock .Any ()).Return (nil ).Times (1 )
714
718
})
715
719
716
720
It ("should update status" , func () {
@@ -752,6 +756,7 @@ var _ = Describe("ReconcilePostgres", func() {
752
756
// customers schema
753
757
pg .EXPECT ().CreateSchema (name , name + "-group" , "customers" , gomock .Any ()).Return (nil ).Times (1 )
754
758
pg .EXPECT ().SetSchemaPrivileges (name , name + "-group" , gomock .Any (), "customers" , gomock .Any (), gomock .Any ()).Return (nil ).Times (2 )
759
+ pg .EXPECT ().SetSchemaPrivilegesCreate (name , name + "-group" , name + "-writer" , "customers" , gomock .Any (), gomock .Any ()).Return (nil ).Times (1 )
755
760
// stores schema already exists
756
761
pg .EXPECT ().CreateSchema (name , name + "-group" , "stores" , gomock .Any ()).Times (0 )
757
762
// Call reconcile
0 commit comments