@@ -682,10 +682,10 @@ var _ = Describe("ReconcilePostgres", func() {
682
682
// Expected method calls
683
683
// customers schema
684
684
pg .EXPECT ().CreateSchema (name , name + "-group" , "customers" , gomock .Any ()).Return (nil ).Times (1 )
685
- pg .EXPECT ().SetSchemaPrivileges (name , name + "-group" , gomock .Any (), "customers" , gomock .Any (), gomock .Any ()) .Return (nil ).Times (2 )
685
+ pg .EXPECT ().SetSchemaPrivileges (name , name + "-group" , gomock .Any (), "customers" , gomock .Any (), gomock .Any (), gomock . Any ()) .Return (nil ).Times (3 )
686
686
// stores schema
687
687
pg .EXPECT ().CreateSchema (name , name + "-group" , "stores" , gomock .Any ()).Return (nil ).Times (1 )
688
- pg .EXPECT ().SetSchemaPrivileges (name , name + "-group" , gomock .Any (), "stores" , gomock .Any (), gomock .Any ()) .Return (nil ).Times (2 )
688
+ pg .EXPECT ().SetSchemaPrivileges (name , name + "-group" , gomock .Any (), "stores" , gomock .Any (), gomock .Any (), gomock . Any ()) .Return (nil ).Times (3 )
689
689
})
690
690
691
691
It ("should update status" , func () {
@@ -707,10 +707,12 @@ var _ = Describe("ReconcilePostgres", func() {
707
707
// Expected method calls
708
708
// customers schema errors
709
709
pg .EXPECT ().CreateSchema (name , name + "-group" , "customers" , gomock .Any ()).Return (fmt .Errorf ("Could not create schema" )).Times (1 )
710
- pg .EXPECT ().SetSchemaPrivileges (name , name + "-group" , gomock .Any (), "customers" , gomock .Any (), gomock .Any ()).Return (nil ).Times (0 )
710
+ pg .EXPECT ().SetSchemaPrivileges (name , name + "-group" , gomock .Any (), "customers" , gomock .Any (), gomock .Any () , gomock . Any () ).Return (nil ).Times (0 )
711
711
// stores schema
712
712
pg .EXPECT ().CreateSchema (name , name + "-group" , "stores" , gomock .Any ()).Return (nil ).Times (1 )
713
- pg .EXPECT ().SetSchemaPrivileges (name , name + "-group" , gomock .Any (), "stores" , gomock .Any (), gomock .Any ()).Return (nil ).Times (2 )
713
+ pg .EXPECT ().SetSchemaPrivileges (name , name + "-group" , name + "-reader" , "stores" , gomock .Any (), false , gomock .Any ()).Return (nil ).Times (1 )
714
+ pg .EXPECT ().SetSchemaPrivileges (name , name + "-group" , name + "-writer" , "stores" , gomock .Any (), true , gomock .Any ()).Return (nil ).Times (1 )
715
+ pg .EXPECT ().SetSchemaPrivileges (name , name + "-group" , name + "-group" , "stores" , gomock .Any (), true , gomock .Any ()).Return (nil ).Times (1 )
714
716
})
715
717
716
718
It ("should update status" , func () {
@@ -751,7 +753,7 @@ var _ = Describe("ReconcilePostgres", func() {
751
753
// Expected method calls
752
754
// customers schema
753
755
pg .EXPECT ().CreateSchema (name , name + "-group" , "customers" , gomock .Any ()).Return (nil ).Times (1 )
754
- pg .EXPECT ().SetSchemaPrivileges (name , name + "-group" , gomock .Any (), "customers" , gomock .Any (), gomock .Any ()) .Return (nil ).Times (2 )
756
+ pg .EXPECT ().SetSchemaPrivileges (name , name + "-group" , gomock .Any (), "customers" , gomock .Any (), gomock .Any (), gomock . Any ()) .Return (nil ).Times (3 )
755
757
// stores schema already exists
756
758
pg .EXPECT ().CreateSchema (name , name + "-group" , "stores" , gomock .Any ()).Times (0 )
757
759
// Call reconcile
0 commit comments