Skip to content

Commit d56f343

Browse files
committed
codecov
1 parent 325a719 commit d56f343

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

internal/common/auth/service_wrapper_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,3 +763,19 @@ func (s *serviceWrapperSuite) TestFailoverDomainInvalidToken() {
763763
_, err := sw.FailoverDomain(ctx, &shared.FailoverDomainRequest{})
764764
s.EqualError(err, "error")
765765
}
766+
767+
func (s *serviceWrapperSuite) TestListFailoverHistoryValidToken() {
768+
s.Service.EXPECT().ListFailoverHistory(gomock.Any(), gomock.Any(), gomock.Any()).Times(1)
769+
sw := NewWorkflowServiceWrapper(s.Service, s.AuthProvider)
770+
ctx, _ := thrift.NewContext(time.Minute)
771+
_, err := sw.ListFailoverHistory(ctx, &shared.ListFailoverHistoryRequest{})
772+
s.NoError(err)
773+
}
774+
775+
func (s *serviceWrapperSuite) TestListFailoverHistoryInvalidToken() {
776+
s.AuthProvider = newJWTAuthIncorrect()
777+
sw := NewWorkflowServiceWrapper(s.Service, s.AuthProvider)
778+
ctx, _ := thrift.NewContext(time.Minute)
779+
_, err := sw.ListFailoverHistory(ctx, &shared.ListFailoverHistoryRequest{})
780+
s.EqualError(err, "error")
781+
}

internal/common/isolationgroup/service_wrapper_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,15 @@ func TestAPICalls(t *testing.T) {
415415
},
416416
expectedResponse: &shared.FailoverDomainResponse{},
417417
},
418+
"ListFailoverHistory": {
419+
action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) {
420+
return sw.ListFailoverHistory(ctx, &shared.ListFailoverHistoryRequest{})
421+
},
422+
affordance: func(m *workflowservicetest.MockClient) {
423+
m.EXPECT().ListFailoverHistory(gomock.Any(), &shared.ListFailoverHistoryRequest{}, gomock.Any()).Times(1).Return(&shared.ListFailoverHistoryResponse{}, nil)
424+
},
425+
expectedResponse: &shared.ListFailoverHistoryResponse{},
426+
},
418427
}
419428

420429
for name, td := range tests {

internal/convert_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ func TestConvertActiveClusterSelectionPolicy(t *testing.T) {
100100
policy: nil,
101101
thriftPolicy: nil,
102102
},
103+
{
104+
name: "empty policy",
105+
policy: &ActiveClusterSelectionPolicy{},
106+
thriftPolicy: &s.ActiveClusterSelectionPolicy{},
107+
},
103108
{
104109
name: "valid policy",
105110
policy: &ActiveClusterSelectionPolicy{

0 commit comments

Comments
 (0)