@@ -31,8 +31,229 @@ import (
31
31
"github.com/uber/cadence/.gen/go/admin"
32
32
"github.com/uber/cadence/.gen/go/shared"
33
33
"github.com/uber/cadence/common/types"
34
+ "github.com/uber/cadence/common/types/testdata"
34
35
)
35
36
37
+ func TestAdminAddSearchAttributeRequest (t * testing.T ) {
38
+ for _ , item := range []* types.AddSearchAttributeRequest {nil , {}, & testdata .AdminAddSearchAttributeRequest } {
39
+ assert .Equal (t , item , ToAdminAddSearchAttributeRequest (FromAdminAddSearchAttributeRequest (item )))
40
+ }
41
+ }
42
+ func TestAdminCloseShardRequest (t * testing.T ) {
43
+ for _ , item := range []* types.CloseShardRequest {nil , {}, & testdata .AdminCloseShardRequest } {
44
+ assert .Equal (t , item , ToAdminCloseShardRequest (FromAdminCloseShardRequest (item )))
45
+ }
46
+ }
47
+ func TestAdminDeleteWorkflowRequest (t * testing.T ) {
48
+ for _ , item := range []* types.AdminDeleteWorkflowRequest {nil , {}, & testdata .AdminDeleteWorkflowRequest } {
49
+ assert .Equal (t , item , ToAdminDeleteWorkflowRequest (FromAdminDeleteWorkflowRequest (item )))
50
+ }
51
+ }
52
+ func TestAdminDeleteWorkflowResponse (t * testing.T ) {
53
+ for _ , item := range []* types.AdminDeleteWorkflowResponse {nil , {}, & testdata .AdminDeleteWorkflowResponse } {
54
+ assert .Equal (t , item , ToAdminDeleteWorkflowResponse (FromAdminDeleteWorkflowResponse (item )))
55
+ }
56
+ }
57
+ func TestAdminDescribeClusterResponse (t * testing.T ) {
58
+ for _ , item := range []* types.DescribeClusterResponse {nil , {}, & testdata .AdminDescribeClusterResponse } {
59
+ assert .Equal (t , item , ToAdminDescribeClusterResponse (FromAdminDescribeClusterResponse (item )))
60
+ }
61
+ }
62
+ func TestAdminDescribeHistoryHostRequest (t * testing.T ) {
63
+ for _ , item := range []* types.DescribeHistoryHostRequest {
64
+ nil ,
65
+ & testdata .AdminDescribeHistoryHostRequest_ByHost ,
66
+ & testdata .AdminDescribeHistoryHostRequest_ByShard ,
67
+ & testdata .AdminDescribeHistoryHostRequest_ByExecution ,
68
+ } {
69
+ assert .Equal (t , item , ToAdminDescribeHistoryHostRequest (FromAdminDescribeHistoryHostRequest (item )))
70
+ }
71
+ }
72
+ func TestAdminDescribeHistoryHostResponse (t * testing.T ) {
73
+ for _ , item := range []* types.DescribeHistoryHostResponse {nil , {}, & testdata .AdminDescribeHistoryHostResponse } {
74
+ assert .Equal (t , item , ToAdminDescribeHistoryHostResponse (FromAdminDescribeHistoryHostResponse (item )))
75
+ }
76
+ }
77
+ func TestAdminDescribeQueueRequest (t * testing.T ) {
78
+ for _ , item := range []* types.DescribeQueueRequest {nil , {}, & testdata .AdminDescribeQueueRequest } {
79
+ assert .Equal (t , item , ToAdminDescribeQueueRequest (FromAdminDescribeQueueRequest (item )))
80
+ }
81
+ }
82
+ func TestAdminDescribeQueueResponse (t * testing.T ) {
83
+ for _ , item := range []* types.DescribeQueueResponse {nil , {}, & testdata .AdminDescribeQueueResponse } {
84
+ assert .Equal (t , item , ToAdminDescribeQueueResponse (FromAdminDescribeQueueResponse (item )))
85
+ }
86
+ }
87
+ func TestAdminDescribeShardDistributionRequest (t * testing.T ) {
88
+ for _ , item := range []* types.DescribeShardDistributionRequest {nil , {}, & testdata .AdminDescribeShardDistributionRequest } {
89
+ assert .Equal (t , item , ToAdminDescribeShardDistributionRequest (FromAdminDescribeShardDistributionRequest (item )))
90
+ }
91
+ }
92
+ func TestAdminDescribeShardDistributionResponse (t * testing.T ) {
93
+ for _ , item := range []* types.DescribeShardDistributionResponse {nil , {}, & testdata .AdminDescribeShardDistributionResponse } {
94
+ assert .Equal (t , item , ToAdminDescribeShardDistributionResponse (FromAdminDescribeShardDistributionResponse (item )))
95
+ }
96
+ }
97
+ func TestAdminDescribeWorkflowExecutionRequest (t * testing.T ) {
98
+ for _ , item := range []* types.AdminDescribeWorkflowExecutionRequest {nil , {}, & testdata .AdminDescribeWorkflowExecutionRequest } {
99
+ assert .Equal (t , item , ToAdminDescribeWorkflowExecutionRequest (FromAdminDescribeWorkflowExecutionRequest (item )))
100
+ }
101
+ }
102
+ func TestAdminDescribeWorkflowExecutionResponse (t * testing.T ) {
103
+ for _ , item := range []* types.AdminDescribeWorkflowExecutionResponse {nil , {ShardID : "0" }, & testdata .AdminDescribeWorkflowExecutionResponse } {
104
+ assert .Equal (t , item , ToAdminDescribeWorkflowExecutionResponse (FromAdminDescribeWorkflowExecutionResponse (item )))
105
+ }
106
+ }
107
+ func TestAdminGetDomainIsolationGroupsRequest (t * testing.T ) {
108
+ for _ , item := range []* types.GetDomainIsolationGroupsRequest {nil , {}, & testdata .AdminGetDomainIsolationGroupsRequest } {
109
+ assert .Equal (t , item , ToAdminGetDomainIsolationGroupsRequest (FromAdminGetDomainIsolationGroupsRequest (item )))
110
+ }
111
+ }
112
+ func TestAdminGetDomainIsolationGroupsResponse (t * testing.T ) {
113
+ for _ , item := range []* types.GetDomainIsolationGroupsResponse {nil , {}, & testdata .AdminGetDomainIsolationGroupsResponse } {
114
+ assert .Equal (t , item , ToAdminGetDomainIsolationGroupsResponse (FromAdminGetDomainIsolationGroupsResponse (item )))
115
+ }
116
+ }
117
+ func TestAdminGetDomainReplicationMessagesRequest (t * testing.T ) {
118
+ for _ , item := range []* types.GetDomainReplicationMessagesRequest {nil , {}, & testdata .AdminGetDomainReplicationMessagesRequest } {
119
+ assert .Equal (t , item , ToAdminGetDomainReplicationMessagesRequest (FromAdminGetDomainReplicationMessagesRequest (item )))
120
+ }
121
+ }
122
+ func TestAdminGetDomainReplicationMessagesResponse (t * testing.T ) {
123
+ for _ , item := range []* types.GetDomainReplicationMessagesResponse {nil , {}, & testdata .AdminGetDomainReplicationMessagesResponse } {
124
+ assert .Equal (t , item , ToAdminGetDomainReplicationMessagesResponse (FromAdminGetDomainReplicationMessagesResponse (item )))
125
+ }
126
+ }
127
+ func TestAdminGetDynamicConfigRequest (t * testing.T ) {
128
+ for _ , item := range []* types.GetDynamicConfigRequest {nil , {}, & testdata .AdminGetDynamicConfigRequest } {
129
+ assert .Equal (t , item , ToAdminGetDynamicConfigRequest (FromAdminGetDynamicConfigRequest (item )))
130
+ }
131
+ }
132
+ func TestAdminGetDynamicConfigResponse (t * testing.T ) {
133
+ for _ , item := range []* types.GetDynamicConfigResponse {nil , {}, & testdata .AdminGetDynamicConfigResponse } {
134
+ assert .Equal (t , item , ToAdminGetDynamicConfigResponse (FromAdminGetDynamicConfigResponse (item )))
135
+ }
136
+ }
137
+ func TestAdminGetGlobalIsolationGroupsRequest (t * testing.T ) {
138
+ for _ , item := range []* types.GetGlobalIsolationGroupsRequest {nil , {}, & testdata .AdminGetGlobalIsolationGroupsRequest } {
139
+ assert .Equal (t , item , ToAdminGetGlobalIsolationGroupsRequest (FromAdminGetGlobalIsolationGroupsRequest (item )))
140
+ }
141
+ }
142
+ func TestAdminGetReplicationMessagesRequest (t * testing.T ) {
143
+ for _ , item := range []* types.GetReplicationMessagesRequest {nil , {}, & testdata .AdminGetReplicationMessagesRequest } {
144
+ assert .Equal (t , item , ToAdminGetReplicationMessagesRequest (FromAdminGetReplicationMessagesRequest (item )))
145
+ }
146
+ }
147
+ func TestAdminGetReplicationMessagesResponse (t * testing.T ) {
148
+ for _ , item := range []* types.GetReplicationMessagesResponse {nil , {}, & testdata .AdminGetReplicationMessagesResponse } {
149
+ assert .Equal (t , item , ToAdminGetReplicationMessagesResponse (FromAdminGetReplicationMessagesResponse (item )))
150
+ }
151
+ }
152
+ func TestAdminGetWorkflowExecutionRawHistoryV2Request (t * testing.T ) {
153
+ for _ , item := range []* types.GetWorkflowExecutionRawHistoryV2Request {nil , {}, & testdata .AdminGetWorkflowExecutionRawHistoryV2Request } {
154
+ assert .Equal (t , item , ToAdminGetWorkflowExecutionRawHistoryV2Request (FromAdminGetWorkflowExecutionRawHistoryV2Request (item )))
155
+ }
156
+ }
157
+ func TestAdminGetWorkflowExecutionRawHistoryV2Response (t * testing.T ) {
158
+ for _ , item := range []* types.GetWorkflowExecutionRawHistoryV2Response {nil , {}, & testdata .AdminGetWorkflowExecutionRawHistoryV2Response } {
159
+ assert .Equal (t , item , ToAdminGetWorkflowExecutionRawHistoryV2Response (FromAdminGetWorkflowExecutionRawHistoryV2Response (item )))
160
+ }
161
+ }
162
+ func TestAdminListDynamicConfigRequest (t * testing.T ) {
163
+ for _ , item := range []* types.ListDynamicConfigRequest {nil , {}, & testdata .AdminListDynamicConfigRequest } {
164
+ assert .Equal (t , item , ToAdminListDynamicConfigRequest (FromAdminListDynamicConfigRequest (item )))
165
+ }
166
+ }
167
+ func TestAdminListDynamicConfigResponse (t * testing.T ) {
168
+ for _ , item := range []* types.ListDynamicConfigResponse {nil , {}, & testdata .AdminListDynamicConfigResponse } {
169
+ assert .Equal (t , item , ToAdminListDynamicConfigResponse (FromAdminListDynamicConfigResponse (item )))
170
+ }
171
+ }
172
+ func TestAdminMaintainCorruptWorkflowRequest (t * testing.T ) {
173
+ for _ , item := range []* types.AdminMaintainWorkflowRequest {nil , {}, & testdata .AdminMaintainCorruptWorkflowRequest } {
174
+ assert .Equal (t , item , ToAdminMaintainCorruptWorkflowRequest (FromAdminMaintainCorruptWorkflowRequest (item )))
175
+ }
176
+ }
177
+ func TestAdminMaintainCorruptWorkflowResponse (t * testing.T ) {
178
+ for _ , item := range []* types.AdminMaintainWorkflowResponse {nil , {}, & testdata .AdminMaintainCorruptWorkflowResponse } {
179
+ assert .Equal (t , item , ToAdminMaintainCorruptWorkflowResponse (FromAdminMaintainCorruptWorkflowResponse (item )))
180
+ }
181
+ }
182
+ func TestAdminReapplyEventsRequest (t * testing.T ) {
183
+ for _ , item := range []* types.ReapplyEventsRequest {nil , {}, & testdata .AdminReapplyEventsRequest } {
184
+ assert .Equal (t , item , ToAdminReapplyEventsRequest (FromAdminReapplyEventsRequest (item )))
185
+ }
186
+ }
187
+ func TestAdminRefreshWorkflowTasksRequest (t * testing.T ) {
188
+ for _ , item := range []* types.RefreshWorkflowTasksRequest {nil , {}, & testdata .AdminRefreshWorkflowTasksRequest } {
189
+ assert .Equal (t , item , ToAdminRefreshWorkflowTasksRequest (FromAdminRefreshWorkflowTasksRequest (item )))
190
+ }
191
+ }
192
+ func TestAdminRemoveTaskRequest (t * testing.T ) {
193
+ for _ , item := range []* types.RemoveTaskRequest {nil , {}, & testdata .AdminRemoveTaskRequest } {
194
+ assert .Equal (t , item , ToAdminRemoveTaskRequest (FromAdminRemoveTaskRequest (item )))
195
+ }
196
+ }
197
+ func TestAdminResendReplicationTasksRequest (t * testing.T ) {
198
+ for _ , item := range []* types.ResendReplicationTasksRequest {nil , {}, & testdata .AdminResendReplicationTasksRequest } {
199
+ assert .Equal (t , item , ToAdminResendReplicationTasksRequest (FromAdminResendReplicationTasksRequest (item )))
200
+ }
201
+ }
202
+ func TestAdminResetQueueRequest (t * testing.T ) {
203
+ for _ , item := range []* types.ResetQueueRequest {nil , {}, & testdata .AdminResetQueueRequest } {
204
+ assert .Equal (t , item , ToAdminResetQueueRequest (FromAdminResetQueueRequest (item )))
205
+ }
206
+ }
207
+
208
+ func TestAdminGetCrossClusterTasksRequest (t * testing.T ) {
209
+ for _ , item := range []* types.GetCrossClusterTasksRequest {nil , {}, & testdata .AdminGetCrossClusterTasksRequest } {
210
+ assert .Equal (t , item , ToAdminGetCrossClusterTasksRequest (FromAdminGetCrossClusterTasksRequest (item )))
211
+ }
212
+ }
213
+
214
+ func TestAdminGetCrossClusterTasksResponse (t * testing.T ) {
215
+ for _ , item := range []* types.GetCrossClusterTasksResponse {nil , {}, & testdata .AdminGetCrossClusterTasksResponse } {
216
+ assert .Equal (t , item , ToAdminGetCrossClusterTasksResponse (FromAdminGetCrossClusterTasksResponse (item )))
217
+ }
218
+ }
219
+
220
+ func TestAdminRespondCrossClusterTasksCompletedRequest (t * testing.T ) {
221
+ for _ , item := range []* types.RespondCrossClusterTasksCompletedRequest {nil , {}, & testdata .AdminRespondCrossClusterTasksCompletedRequest } {
222
+ assert .Equal (t , item , ToAdminRespondCrossClusterTasksCompletedRequest (FromAdminRespondCrossClusterTasksCompletedRequest (item )))
223
+ }
224
+ }
225
+
226
+ func TestAdminRespondCrossClusterTasksCompletedResponse (t * testing.T ) {
227
+ for _ , item := range []* types.RespondCrossClusterTasksCompletedResponse {nil , {}, & testdata .AdminRespondCrossClusterTasksCompletedResponse } {
228
+ assert .Equal (t , item , ToAdminRespondCrossClusterTasksCompletedResponse (FromAdminRespondCrossClusterTasksCompletedResponse (item )))
229
+ }
230
+ }
231
+ func TestAdminUpdateDomainIsolationGroupsRequest (t * testing.T ) {
232
+ for _ , item := range []* types.UpdateDomainIsolationGroupsRequest {nil , {}, & testdata .AdminUpdateDomainIsolationGroupsRequest } {
233
+ assert .Equal (t , item , ToAdminUpdateDomainIsolationGroupsRequest (FromAdminUpdateDomainIsolationGroupsRequest (item )))
234
+ }
235
+ }
236
+ func TestAdminUpdateDomainIsolationGroupsResponse (t * testing.T ) {
237
+ for _ , item := range []* types.UpdateDomainIsolationGroupsResponse {nil , {}, & testdata .AdminUpdateDomainIsolationGroupsResponse } {
238
+ assert .Equal (t , item , ToAdminUpdateDomainIsolationGroupsResponse (FromAdminUpdateDomainIsolationGroupsResponse (item )))
239
+ }
240
+ }
241
+ func TestAdminRestoreDynamicConfigRequest (t * testing.T ) {
242
+ for _ , item := range []* types.RestoreDynamicConfigRequest {nil , {}, & testdata .AdminRestoreDynamicConfigRequest } {
243
+ assert .Equal (t , item , ToAdminRestoreDynamicConfigRequest (FromAdminRestoreDynamicConfigRequest (item )))
244
+ }
245
+ }
246
+ func TestAdminUpdateDynamicConfigRequest (t * testing.T ) {
247
+ for _ , item := range []* types.UpdateDynamicConfigRequest {nil , {}, & testdata .AdminUpdateDynamicConfigRequest } {
248
+ assert .Equal (t , item , ToAdminUpdateDynamicConfigRequest (FromAdminUpdateDynamicConfigRequest (item )))
249
+ }
250
+ }
251
+ func TestAdminUpdateGlobalIsolationGroupsResponse (t * testing.T ) {
252
+ for _ , item := range []* types.UpdateGlobalIsolationGroupsResponse {nil , {}, & testdata .AdminUpdateGlobalIsolationGroupsResponse } {
253
+ assert .Equal (t , item , ToAdminUpdateGlobalIsolationGroupsResponse (FromAdminUpdateGlobalIsolationGroupsResponse (item )))
254
+ }
255
+ }
256
+
36
257
func TestFromGetGlobalIsolationGroupsResponse (t * testing.T ) {
37
258
tests := map [string ]struct {
38
259
in * types.GetGlobalIsolationGroupsResponse
0 commit comments