From 43c034d651a8f6b2319444ff34e44ea5a2e03d66 Mon Sep 17 00:00:00 2001 From: Abhishek Jha Date: Mon, 11 Mar 2024 11:28:38 -0700 Subject: [PATCH] removed unexpected calls --- common/domain/replicationTaskExecutor_test.go | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/common/domain/replicationTaskExecutor_test.go b/common/domain/replicationTaskExecutor_test.go index 1d5a21ed7a1..74c56ddd2e9 100644 --- a/common/domain/replicationTaskExecutor_test.go +++ b/common/domain/replicationTaskExecutor_test.go @@ -352,14 +352,6 @@ func TestHandleDomainCreationReplicationTask(t *testing.T) { mockDomainManager.EXPECT(). CreateDomain(gomock.Any(), gomock.Any()). Return(nil, ErrNameUUIDCollision).Times(1) - - mockDomainManager.EXPECT(). - GetDomain(gomock.Any(), gomock.Any()). - Return(nil, &types.EntityNotExistsError{}).Times(1) // Simulate no domain found by name - - mockDomainManager.EXPECT(). - GetDomain(gomock.Any(), gomock.Any()). - Return(nil, &types.EntityNotExistsError{}).Times(1) // Simulate no domain found by ID }, task: validTask, wantError: true, @@ -415,10 +407,6 @@ func TestHandleDomainCreationReplicationTask(t *testing.T) { mockDomainManager.EXPECT(). CreateDomain(gomock.Any(), gomock.Any()). Return(nil, ErrInvalidDomainStatus).Times(1) - - mockDomainManager.EXPECT(). - GetDomain(gomock.Any(), gomock.Any()). - Return(nil, types.InternalServiceError{Message: "unexpected internal error"}).Times(1) }, task: validTask, wantError: true, @@ -439,21 +427,6 @@ func TestHandleDomainCreationReplicationTask(t *testing.T) { task: validTask, wantError: true, // Expect an error because of the name/UUID collision }, - { - name: "Unexpected Error Type from GetDomain Leads to Default Error Handling", - setup: func() { - mockDomainManager.EXPECT(). - CreateDomain(gomock.Any(), gomock.Any()). - Return(nil, ErrNameUUIDCollision).Times(1) - - // Trigger an unexpected error type from GetDomain - mockDomainManager.EXPECT(). - GetDomain(gomock.Any(), gomock.Any()). - Return(nil, types.InternalServiceError{Message: "unexpected internal error"}).Times(1) - }, - task: validTask, - wantError: true, - }, } for _, tt := range tests {