@@ -26,6 +26,7 @@ func TestListRelationsLatestAuthModelError(t *testing.T) {
2626
2727 mockCtrl := gomock .NewController (t )
2828 defer mockCtrl .Finish ()
29+
2930 mockFgaClient := mock_client .NewMockSdkClient (mockCtrl )
3031
3132 mockExecute := mock_client .NewMockSdkClientReadLatestAuthorizationModelRequestInterface (mockCtrl )
@@ -41,6 +42,7 @@ func TestListRelationsLatestAuthModelError(t *testing.T) {
4142 contextualTuples := []client.ClientContextualTupleKey {
4243 {User : "user:foo" , Relation : "admin" , Object : "doc:doc1" },
4344 }
45+
4446 _ , err := listRelations (
4547 t .Context (),
4648 clientConfig ,
@@ -52,7 +54,6 @@ func TestListRelationsLatestAuthModelError(t *testing.T) {
5254 queryContext ,
5355 openfga .CONSISTENCYPREFERENCE_UNSPECIFIED .Ptr (),
5456 )
55-
5657 if err == nil {
5758 t .Error ("Expect error but there is none" )
5859 }
@@ -63,6 +64,7 @@ func TestListRelationsAuthModelSpecifiedError(t *testing.T) {
6364
6465 mockCtrl := gomock .NewController (t )
6566 defer mockCtrl .Finish ()
67+
6668 mockFgaClient := mock_client .NewMockSdkClient (mockCtrl )
6769
6870 mockExecute := mock_client .NewMockSdkClientReadAuthorizationModelRequestInterface (mockCtrl )
@@ -80,6 +82,7 @@ func TestListRelationsAuthModelSpecifiedError(t *testing.T) {
8082 contextualTuples := []client.ClientContextualTupleKey {
8183 {User : "user:foo" , Relation : "admin" , Object : "doc:doc1" },
8284 }
85+
8386 _ , err := listRelations (
8487 t .Context (),
8588 clientConfig ,
@@ -91,7 +94,6 @@ func TestListRelationsAuthModelSpecifiedError(t *testing.T) {
9194 queryContext ,
9295 openfga .CONSISTENCYPREFERENCE_UNSPECIFIED .Ptr (),
9396 )
94-
9597 if err == nil {
9698 t .Error ("Expect error but there is none" )
9799 }
@@ -102,6 +104,7 @@ func TestListRelationsLatestAuthModelListError(t *testing.T) {
102104
103105 mockCtrl := gomock .NewController (t )
104106 defer mockCtrl .Finish ()
107+
105108 mockFgaClient := mock_client .NewMockSdkClient (mockCtrl )
106109
107110 mockExecute := mock_client .NewMockSdkClientReadLatestAuthorizationModelRequestInterface (mockCtrl )
@@ -169,6 +172,7 @@ func TestListRelationsLatestAuthModelEmpty(t *testing.T) {
169172
170173 mockCtrl := gomock .NewController (t )
171174 defer mockCtrl .Finish ()
175+
172176 mockFgaClient := mock_client .NewMockSdkClient (mockCtrl )
173177
174178 mockExecute := mock_client .NewMockSdkClientReadLatestAuthorizationModelRequestInterface (mockCtrl )
@@ -219,6 +223,7 @@ func TestListRelationsLatestAuthModelList(t *testing.T) {
219223
220224 mockCtrl := gomock .NewController (t )
221225 defer mockCtrl .Finish ()
226+
222227 mockFgaClient := mock_client .NewMockSdkClient (mockCtrl )
223228
224229 mockExecute := mock_client .NewMockSdkClientReadLatestAuthorizationModelRequestInterface (mockCtrl )
@@ -292,6 +297,7 @@ func TestListRelationsMultipleRelations(t *testing.T) {
292297
293298 mockCtrl := gomock .NewController (t )
294299 defer mockCtrl .Finish ()
300+
295301 mockFgaClient := mock_client .NewMockSdkClient (mockCtrl )
296302
297303 // after reading the latest auth model, expect to call list relations but failure
@@ -353,6 +359,7 @@ func TestListRelationsWithConsistency(t *testing.T) {
353359
354360 mockCtrl := gomock .NewController (t )
355361 defer mockCtrl .Finish ()
362+
356363 mockFgaClient := mock_client .NewMockSdkClient (mockCtrl )
357364
358365 mockListRelationsExecute := mock_client .NewMockSdkClientListRelationsRequestInterface (mockCtrl )
0 commit comments