@@ -140,3 +140,89 @@ func TestSageMaker_Error_Suffix_Message(t *testing.T) {
140
140
// Validation Exception has suffix ModelPackageGroup arn:aws:sagemaker:/ does not exist
141
141
assert .Equal ("&& strings.HasSuffix(awsErr.Message(), \" does not exist.\" ) " , code .CheckExceptionMessage (crd .Config (), crd , 404 ))
142
142
}
143
+
144
+ func TestSageMaker_RequeueOnSuccessSeconds (t * testing.T ) {
145
+ assert := assert .New (t )
146
+ require := require .New (t )
147
+
148
+ g := testutil .NewGeneratorForService (t , "sagemaker" )
149
+
150
+ crds , err := g .GetCRDs ()
151
+ require .Nil (err )
152
+
153
+ crd := getCRDByName ("Endpoint" , crds )
154
+ require .NotNil (crd )
155
+
156
+ // The CreateEndpoint has the following definition:
157
+ //
158
+ // "CreateEndpoint":{
159
+ // "name":"CreateEndpoint",
160
+ // "http":{
161
+ // "method":"POST",
162
+ // "requestUri":"/"
163
+ // },
164
+ // "input":{"shape":"CreateEndpointInput"},
165
+ // "output":{"shape":"CreateEndpointOutput"},
166
+ // "errors":[
167
+ // {"shape":"ResourceLimitExceeded"}
168
+ // ]
169
+ // }
170
+ //
171
+ // Where the CreateEndpointOutput shape looks like this:
172
+ //
173
+ // "CreateEndpointOutput":{
174
+ // "type":"structure",
175
+ // "required":["EndpointArn"],
176
+ // "members":{
177
+ // "EndpointArn":{"shape":"EndpointArn"}
178
+ // }
179
+ // }
180
+ //
181
+ // So, we expect that crd.ReconcileRequeuOnSuccessSeconds() returns the requeue
182
+ // duration specified in the config file
183
+ assert .Equal (10 , crd .ReconcileRequeuOnSuccessSeconds ())
184
+ }
185
+
186
+ func TestSageMaker_RequeueOnSuccessSeconds_Default (t * testing.T ) {
187
+ assert := assert .New (t )
188
+ require := require .New (t )
189
+
190
+ g := testutil .NewGeneratorForService (t , "sagemaker" )
191
+
192
+ crds , err := g .GetCRDs ()
193
+ require .Nil (err )
194
+
195
+ crd := getCRDByName ("DataQualityJobDefinition" , crds )
196
+ require .NotNil (crd )
197
+
198
+ // The CreateDataQualityJobDefinition has the following definition:
199
+ //
200
+ // "CreateDataQualityJobDefinition":{
201
+ // "name":"CreateDataQualityJobDefinition",
202
+ // "http":{
203
+ // "method":"POST",
204
+ // "requestUri":"/"
205
+ // },
206
+ // "input":{"shape":"CreateDataQualityJobDefinitionRequest"},
207
+ // "output":{"shape":"CreateDataQualityJobDefinitionResponse"},
208
+ // "errors":[
209
+ // {"shape":"ResourceLimitExceeded"},
210
+ // {"shape":"ResourceInUse"}
211
+ // ]
212
+ // }
213
+ //
214
+ // Where the CreateDataQualityJobDefinitionResponse shape looks like this:
215
+ //
216
+ // "CreateDataQualityJobDefinitionResponse":{
217
+ // "type":"structure",
218
+ // "required":["JobDefinitionArn"],
219
+ // "members":{
220
+ // "JobDefinitionArn":{"shape":"MonitoringJobDefinitionArn"}
221
+ // }
222
+ // }
223
+ //
224
+ // So, we expect that crd.ReconcileRequeuOnSuccessSeconds() returns the default
225
+ // requeue duration of 0 because it is not specified in the config file
226
+ assert .Equal (0 , crd .ReconcileRequeuOnSuccessSeconds ())
227
+
228
+ }
0 commit comments