@itentialopensource/adapter-aws_cognito_identity_provider 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/.eslintignore +5 -0
  2. package/.eslintrc.js +18 -0
  3. package/.jshintrc +3 -0
  4. package/AUTH.md +108 -0
  5. package/BROKER.md +211 -0
  6. package/CALLS.md +813 -0
  7. package/CHANGELOG.md +9 -0
  8. package/CODE_OF_CONDUCT.md +43 -0
  9. package/CONTRIBUTING.md +13 -0
  10. package/ENHANCE.md +69 -0
  11. package/LICENSE +201 -0
  12. package/PROPERTIES.md +646 -0
  13. package/README.md +343 -0
  14. package/SUMMARY.md +9 -0
  15. package/SYSTEMINFO.md +16 -0
  16. package/TAB1.md +8 -0
  17. package/TAB2.md +392 -0
  18. package/TROUBLESHOOT.md +47 -0
  19. package/adapter.js +14144 -0
  20. package/adapterBase.js +1452 -0
  21. package/entities/.generic/action.json +214 -0
  22. package/entities/.generic/schema.json +28 -0
  23. package/entities/.system/action.json +50 -0
  24. package/entities/.system/mockdatafiles/getToken-default.json +3 -0
  25. package/entities/.system/mockdatafiles/healthcheck-default.json +3 -0
  26. package/entities/.system/schema.json +19 -0
  27. package/entities/.system/schemaTokenReq.json +53 -0
  28. package/entities/.system/schemaTokenResp.json +53 -0
  29. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAddCustomAttributes/action.json +24 -0
  30. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAddCustomAttributes/schema.json +19 -0
  31. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminAddUserToGroup/action.json +24 -0
  32. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminAddUserToGroup/schema.json +19 -0
  33. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminConfirmSignUp/action.json +24 -0
  34. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminConfirmSignUp/schema.json +19 -0
  35. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminCreateUser/action.json +24 -0
  36. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminCreateUser/schema.json +19 -0
  37. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminDeleteUser/action.json +24 -0
  38. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminDeleteUser/schema.json +19 -0
  39. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminDeleteUserAttributes/action.json +24 -0
  40. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminDeleteUserAttributes/schema.json +19 -0
  41. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminDisableProviderForUser/action.json +24 -0
  42. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminDisableProviderForUser/schema.json +19 -0
  43. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminDisableUser/action.json +24 -0
  44. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminDisableUser/schema.json +19 -0
  45. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminEnableUser/action.json +24 -0
  46. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminEnableUser/schema.json +19 -0
  47. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminForgetDevice/action.json +24 -0
  48. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminForgetDevice/schema.json +19 -0
  49. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminGetDevice/action.json +24 -0
  50. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminGetDevice/schema.json +19 -0
  51. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminGetUser/action.json +24 -0
  52. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminGetUser/schema.json +19 -0
  53. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminInitiateAuth/action.json +24 -0
  54. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminInitiateAuth/schema.json +19 -0
  55. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminLinkProviderForUser/action.json +24 -0
  56. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminLinkProviderForUser/schema.json +19 -0
  57. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminListDevices/action.json +24 -0
  58. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminListDevices/schema.json +19 -0
  59. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminListGroupsForUser/action.json +24 -0
  60. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminListGroupsForUser/schema.json +41 -0
  61. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminListUserAuthEvents/action.json +24 -0
  62. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminListUserAuthEvents/schema.json +41 -0
  63. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminRemoveUserFromGroup/action.json +24 -0
  64. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminRemoveUserFromGroup/schema.json +19 -0
  65. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminResetUserPassword/action.json +24 -0
  66. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminResetUserPassword/schema.json +19 -0
  67. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminRespondToAuthChallenge/action.json +24 -0
  68. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminRespondToAuthChallenge/schema.json +19 -0
  69. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminSetUserMFAPreference/action.json +24 -0
  70. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminSetUserMFAPreference/schema.json +19 -0
  71. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminSetUserPassword/action.json +24 -0
  72. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminSetUserPassword/schema.json +19 -0
  73. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminSetUserSettings/action.json +24 -0
  74. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminSetUserSettings/schema.json +19 -0
  75. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminUpdateAuthEventFeedback/action.json +24 -0
  76. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminUpdateAuthEventFeedback/schema.json +19 -0
  77. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminUpdateDeviceStatus/action.json +24 -0
  78. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminUpdateDeviceStatus/schema.json +19 -0
  79. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminUpdateUserAttributes/action.json +24 -0
  80. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminUpdateUserAttributes/schema.json +19 -0
  81. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminUserGlobalSignOut/action.json +24 -0
  82. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAdminUserGlobalSignOut/schema.json +19 -0
  83. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAssociateSoftwareToken/action.json +24 -0
  84. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceAssociateSoftwareToken/schema.json +19 -0
  85. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceChangePassword/action.json +24 -0
  86. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceChangePassword/schema.json +19 -0
  87. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceConfirmDevice/action.json +24 -0
  88. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceConfirmDevice/schema.json +19 -0
  89. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceConfirmForgotPassword/action.json +24 -0
  90. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceConfirmForgotPassword/schema.json +19 -0
  91. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceConfirmSignUp/action.json +24 -0
  92. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceConfirmSignUp/schema.json +19 -0
  93. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceCreateGroup/action.json +24 -0
  94. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceCreateGroup/schema.json +19 -0
  95. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceCreateIdentityProvider/action.json +24 -0
  96. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceCreateIdentityProvider/schema.json +19 -0
  97. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceCreateResourceServer/action.json +24 -0
  98. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceCreateResourceServer/schema.json +19 -0
  99. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceCreateUserImportJob/action.json +24 -0
  100. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceCreateUserImportJob/schema.json +19 -0
  101. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceCreateUserPool/action.json +24 -0
  102. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceCreateUserPool/schema.json +19 -0
  103. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceCreateUserPoolClient/action.json +24 -0
  104. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceCreateUserPoolClient/schema.json +19 -0
  105. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceCreateUserPoolDomain/action.json +24 -0
  106. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceCreateUserPoolDomain/schema.json +19 -0
  107. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDeleteGroup/action.json +24 -0
  108. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDeleteGroup/schema.json +19 -0
  109. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDeleteIdentityProvider/action.json +24 -0
  110. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDeleteIdentityProvider/schema.json +19 -0
  111. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDeleteResourceServer/action.json +24 -0
  112. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDeleteResourceServer/schema.json +19 -0
  113. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDeleteUser/action.json +24 -0
  114. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDeleteUser/schema.json +19 -0
  115. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDeleteUserAttributes/action.json +24 -0
  116. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDeleteUserAttributes/schema.json +19 -0
  117. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDeleteUserPool/action.json +24 -0
  118. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDeleteUserPool/schema.json +19 -0
  119. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDeleteUserPoolClient/action.json +24 -0
  120. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDeleteUserPoolClient/schema.json +19 -0
  121. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDeleteUserPoolDomain/action.json +24 -0
  122. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDeleteUserPoolDomain/schema.json +19 -0
  123. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDescribeIdentityProvider/action.json +24 -0
  124. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDescribeIdentityProvider/schema.json +19 -0
  125. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDescribeResourceServer/action.json +24 -0
  126. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDescribeResourceServer/schema.json +19 -0
  127. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDescribeRiskConfiguration/action.json +24 -0
  128. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDescribeRiskConfiguration/schema.json +19 -0
  129. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDescribeUserImportJob/action.json +24 -0
  130. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDescribeUserImportJob/schema.json +19 -0
  131. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDescribeUserPool/action.json +24 -0
  132. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDescribeUserPool/schema.json +19 -0
  133. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDescribeUserPoolClient/action.json +24 -0
  134. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDescribeUserPoolClient/schema.json +19 -0
  135. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDescribeUserPoolDomain/action.json +24 -0
  136. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceDescribeUserPoolDomain/schema.json +19 -0
  137. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceForgetDevice/action.json +24 -0
  138. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceForgetDevice/schema.json +19 -0
  139. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceForgotPassword/action.json +24 -0
  140. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceForgotPassword/schema.json +19 -0
  141. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGetCSVHeader/action.json +24 -0
  142. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGetCSVHeader/schema.json +19 -0
  143. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGetDevice/action.json +24 -0
  144. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGetDevice/schema.json +19 -0
  145. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGetGroup/action.json +24 -0
  146. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGetGroup/schema.json +19 -0
  147. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGetIdentityProviderByIdentifier/action.json +24 -0
  148. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGetIdentityProviderByIdentifier/schema.json +19 -0
  149. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGetSigningCertificate/action.json +24 -0
  150. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGetSigningCertificate/schema.json +19 -0
  151. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGetUICustomization/action.json +24 -0
  152. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGetUICustomization/schema.json +19 -0
  153. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGetUser/action.json +24 -0
  154. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGetUser/schema.json +19 -0
  155. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGetUserAttributeVerificationCode/action.json +24 -0
  156. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGetUserAttributeVerificationCode/schema.json +19 -0
  157. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGetUserPoolMfaConfig/action.json +24 -0
  158. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGetUserPoolMfaConfig/schema.json +19 -0
  159. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGlobalSignOut/action.json +24 -0
  160. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceGlobalSignOut/schema.json +19 -0
  161. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceInitiateAuth/action.json +24 -0
  162. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceInitiateAuth/schema.json +19 -0
  163. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListDevices/action.json +24 -0
  164. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListDevices/schema.json +19 -0
  165. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListGroups/action.json +24 -0
  166. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListGroups/schema.json +41 -0
  167. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListIdentityProviders/action.json +24 -0
  168. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListIdentityProviders/schema.json +41 -0
  169. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListResourceServers/action.json +24 -0
  170. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListResourceServers/schema.json +41 -0
  171. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListTagsForResource/action.json +24 -0
  172. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListTagsForResource/schema.json +19 -0
  173. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListUserImportJobs/action.json +24 -0
  174. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListUserImportJobs/schema.json +19 -0
  175. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListUserPoolClients/action.json +24 -0
  176. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListUserPoolClients/schema.json +41 -0
  177. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListUserPools/action.json +24 -0
  178. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListUserPools/schema.json +41 -0
  179. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListUsers/action.json +24 -0
  180. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListUsers/schema.json +41 -0
  181. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListUsersInGroup/action.json +24 -0
  182. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceListUsersInGroup/schema.json +41 -0
  183. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceResendConfirmationCode/action.json +24 -0
  184. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceResendConfirmationCode/schema.json +19 -0
  185. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceRespondToAuthChallenge/action.json +24 -0
  186. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceRespondToAuthChallenge/schema.json +19 -0
  187. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceRevokeToken/action.json +24 -0
  188. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceRevokeToken/schema.json +19 -0
  189. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceSetRiskConfiguration/action.json +24 -0
  190. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceSetRiskConfiguration/schema.json +19 -0
  191. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceSetUICustomization/action.json +24 -0
  192. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceSetUICustomization/schema.json +19 -0
  193. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceSetUserMFAPreference/action.json +24 -0
  194. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceSetUserMFAPreference/schema.json +19 -0
  195. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceSetUserPoolMfaConfig/action.json +24 -0
  196. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceSetUserPoolMfaConfig/schema.json +19 -0
  197. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceSetUserSettings/action.json +24 -0
  198. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceSetUserSettings/schema.json +19 -0
  199. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceSignUp/action.json +24 -0
  200. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceSignUp/schema.json +19 -0
  201. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceStartUserImportJob/action.json +24 -0
  202. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceStartUserImportJob/schema.json +19 -0
  203. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceStopUserImportJob/action.json +24 -0
  204. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceStopUserImportJob/schema.json +19 -0
  205. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceTagResource/action.json +24 -0
  206. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceTagResource/schema.json +19 -0
  207. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUntagResource/action.json +24 -0
  208. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUntagResource/schema.json +19 -0
  209. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUpdateAuthEventFeedback/action.json +24 -0
  210. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUpdateAuthEventFeedback/schema.json +19 -0
  211. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUpdateDeviceStatus/action.json +24 -0
  212. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUpdateDeviceStatus/schema.json +19 -0
  213. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUpdateGroup/action.json +24 -0
  214. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUpdateGroup/schema.json +19 -0
  215. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUpdateIdentityProvider/action.json +24 -0
  216. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUpdateIdentityProvider/schema.json +19 -0
  217. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUpdateResourceServer/action.json +24 -0
  218. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUpdateResourceServer/schema.json +19 -0
  219. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUpdateUserAttributes/action.json +24 -0
  220. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUpdateUserAttributes/schema.json +19 -0
  221. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUpdateUserPool/action.json +24 -0
  222. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUpdateUserPool/schema.json +19 -0
  223. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUpdateUserPoolClient/action.json +24 -0
  224. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUpdateUserPoolClient/schema.json +19 -0
  225. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUpdateUserPoolDomain/action.json +24 -0
  226. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceUpdateUserPoolDomain/schema.json +19 -0
  227. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceVerifySoftwareToken/action.json +24 -0
  228. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceVerifySoftwareToken/schema.json +19 -0
  229. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceVerifyUserAttribute/action.json +24 -0
  230. package/entities/XAmzTargetAWSCognitoIdentityProviderServiceVerifyUserAttribute/schema.json +19 -0
  231. package/error.json +190 -0
  232. package/metadata.json +92 -0
  233. package/package.json +81 -0
  234. package/pronghorn.json +5618 -0
  235. package/propertiesDecorators.json +14 -0
  236. package/propertiesSchema.json +1659 -0
  237. package/refs?service=git-upload-pack +0 -0
  238. package/report/adapterInfo.json +10 -0
  239. package/report/auto-adapter-openapi.json +44 -0
  240. package/report/aws_cognito.json +25915 -0
  241. package/report/creationReport.json +2215 -0
  242. package/sampleProperties.json +270 -0
  243. package/test/integration/adapterTestBasicGet.js +83 -0
  244. package/test/integration/adapterTestConnectivity.js +118 -0
  245. package/test/integration/adapterTestIntegration.js +3106 -0
  246. package/test/unit/adapterBaseTestUnit.js +1024 -0
  247. package/test/unit/adapterTestUnit.js +4433 -0
  248. package/utils/adapterInfo.js +206 -0
  249. package/utils/addAuth.js +94 -0
  250. package/utils/artifactize.js +146 -0
  251. package/utils/basicGet.js +50 -0
  252. package/utils/checkMigrate.js +63 -0
  253. package/utils/entitiesToDB.js +179 -0
  254. package/utils/findPath.js +74 -0
  255. package/utils/methodDocumentor.js +273 -0
  256. package/utils/modify.js +152 -0
  257. package/utils/packModificationScript.js +35 -0
  258. package/utils/patches2bundledDeps.js +90 -0
  259. package/utils/pre-commit.sh +32 -0
  260. package/utils/removeHooks.js +20 -0
  261. package/utils/setup.js +33 -0
  262. package/utils/taskMover.js +309 -0
  263. package/utils/tbScript.js +239 -0
  264. package/utils/tbUtils.js +489 -0
  265. package/utils/testRunner.js +298 -0
  266. package/utils/troubleshootingAdapter.js +193 -0
@@ -0,0 +1,4433 @@
1
+ /* @copyright Itential, LLC 2019 (pre-modifications) */
2
+
3
+ // Set globals
4
+ /* global describe it log pronghornProps */
5
+ /* eslint global-require: warn */
6
+ /* eslint no-unused-vars: warn */
7
+ /* eslint import/no-dynamic-require:warn */
8
+
9
+ // include required items for testing & logging
10
+ const assert = require('assert');
11
+ const path = require('path');
12
+ const util = require('util');
13
+ const execute = require('child_process').execSync;
14
+ const fs = require('fs-extra');
15
+ const mocha = require('mocha');
16
+ const winston = require('winston');
17
+ const { expect } = require('chai');
18
+ const { use } = require('chai');
19
+ const td = require('testdouble');
20
+ const Ajv = require('ajv');
21
+
22
+ const ajv = new Ajv({ strictSchema: false, allErrors: true, allowUnionTypes: true });
23
+ const anything = td.matchers.anything();
24
+ let logLevel = 'none';
25
+ const isRapidFail = false;
26
+
27
+ // read in the properties from the sampleProperties files
28
+ let adaptdir = __dirname;
29
+ if (adaptdir.endsWith('/test/integration')) {
30
+ adaptdir = adaptdir.substring(0, adaptdir.length - 17);
31
+ } else if (adaptdir.endsWith('/test/unit')) {
32
+ adaptdir = adaptdir.substring(0, adaptdir.length - 10);
33
+ }
34
+ const samProps = require(`${adaptdir}/sampleProperties.json`).properties;
35
+
36
+ // these variables can be changed to run in integrated mode so easier to set them here
37
+ // always check these in with bogus data!!!
38
+ samProps.stub = true;
39
+
40
+ // uncomment if connecting
41
+ // samProps.host = 'replace.hostorip.here';
42
+ // samProps.authentication.username = 'username';
43
+ // samProps.authentication.password = 'password';
44
+ // samProps.authentication.token = 'password';
45
+ // samProps.protocol = 'http';
46
+ // samProps.port = 80;
47
+ // samProps.ssl.enabled = false;
48
+ // samProps.ssl.accept_invalid_cert = false;
49
+
50
+ samProps.request.attempt_timeout = 1200000;
51
+ const attemptTimeout = samProps.request.attempt_timeout;
52
+ const { stub } = samProps;
53
+
54
+ // these are the adapter properties. You generally should not need to alter
55
+ // any of these after they are initially set up
56
+ global.pronghornProps = {
57
+ pathProps: {
58
+ encrypted: false
59
+ },
60
+ adapterProps: {
61
+ adapters: [{
62
+ id: 'Test-aws_cognito_identity_provider',
63
+ type: 'AwsCognitoIdentityProvider',
64
+ properties: samProps
65
+ }]
66
+ }
67
+ };
68
+
69
+ global.$HOME = `${__dirname}/../..`;
70
+
71
+ // set the log levels that Pronghorn uses, spam and trace are not defaulted in so without
72
+ // this you may error on log.trace calls.
73
+ const myCustomLevels = {
74
+ levels: {
75
+ spam: 6,
76
+ trace: 5,
77
+ debug: 4,
78
+ info: 3,
79
+ warn: 2,
80
+ error: 1,
81
+ none: 0
82
+ }
83
+ };
84
+
85
+ // need to see if there is a log level passed in
86
+ process.argv.forEach((val) => {
87
+ // is there a log level defined to be passed in?
88
+ if (val.indexOf('--LOG') === 0) {
89
+ // get the desired log level
90
+ const inputVal = val.split('=')[1];
91
+
92
+ // validate the log level is supported, if so set it
93
+ if (Object.hasOwnProperty.call(myCustomLevels.levels, inputVal)) {
94
+ logLevel = inputVal;
95
+ }
96
+ }
97
+ });
98
+
99
+ // need to set global logging
100
+ global.log = winston.createLogger({
101
+ level: logLevel,
102
+ levels: myCustomLevels.levels,
103
+ transports: [
104
+ new winston.transports.Console()
105
+ ]
106
+ });
107
+
108
+ /**
109
+ * Runs the error asserts for the test
110
+ */
111
+ function runErrorAsserts(data, error, code, origin, displayStr) {
112
+ assert.equal(null, data);
113
+ assert.notEqual(undefined, error);
114
+ assert.notEqual(null, error);
115
+ assert.notEqual(undefined, error.IAPerror);
116
+ assert.notEqual(null, error.IAPerror);
117
+ assert.notEqual(undefined, error.IAPerror.displayString);
118
+ assert.notEqual(null, error.IAPerror.displayString);
119
+ assert.equal(code, error.icode);
120
+ assert.equal(origin, error.IAPerror.origin);
121
+ assert.equal(displayStr, error.IAPerror.displayString);
122
+ }
123
+
124
+ // require the adapter that we are going to be using
125
+ const AwsCognitoIdentityProvider = require('../../adapter');
126
+
127
+ // delete the .DS_Store directory in entities -- otherwise this will cause errors
128
+ const dirPath = path.join(__dirname, '../../entities/.DS_Store');
129
+ if (fs.existsSync(dirPath)) {
130
+ try {
131
+ fs.removeSync(dirPath);
132
+ console.log('.DS_Store deleted');
133
+ } catch (e) {
134
+ console.log('Error when deleting .DS_Store:', e);
135
+ }
136
+ }
137
+
138
+ // begin the testing - these should be pretty well defined between the describe and the it!
139
+ describe('[unit] Aws_cognito_identity_provider Adapter Test', () => {
140
+ describe('AwsCognitoIdentityProvider Class Tests', () => {
141
+ const a = new AwsCognitoIdentityProvider(
142
+ pronghornProps.adapterProps.adapters[0].id,
143
+ pronghornProps.adapterProps.adapters[0].properties
144
+ );
145
+
146
+ if (isRapidFail) {
147
+ const state = {};
148
+ state.passed = true;
149
+
150
+ mocha.afterEach(function x() {
151
+ state.passed = state.passed
152
+ && (this.currentTest.state === 'passed');
153
+ });
154
+ mocha.beforeEach(function x() {
155
+ if (!state.passed) {
156
+ return this.currentTest.skip();
157
+ }
158
+ return true;
159
+ });
160
+ }
161
+
162
+ describe('#class instance created', () => {
163
+ it('should be a class with properties', (done) => {
164
+ try {
165
+ assert.notEqual(null, a);
166
+ assert.notEqual(undefined, a);
167
+ const checkId = global.pronghornProps.adapterProps.adapters[0].id;
168
+ assert.equal(checkId, a.id);
169
+ assert.notEqual(null, a.allProps);
170
+ const check = global.pronghornProps.adapterProps.adapters[0].properties.healthcheck.type;
171
+ assert.equal(check, a.healthcheckType);
172
+ done();
173
+ } catch (error) {
174
+ log.error(`Test Failure: ${error}`);
175
+ done(error);
176
+ }
177
+ }).timeout(attemptTimeout);
178
+ });
179
+
180
+ describe('adapterBase.js', () => {
181
+ it('should have an adapterBase.js', (done) => {
182
+ try {
183
+ fs.exists('adapterBase.js', (val) => {
184
+ assert.equal(true, val);
185
+ done();
186
+ });
187
+ } catch (error) {
188
+ log.error(`Test Failure: ${error}`);
189
+ done(error);
190
+ }
191
+ });
192
+ });
193
+
194
+ let wffunctions = [];
195
+ describe('#iapGetAdapterWorkflowFunctions', () => {
196
+ it('should retrieve workflow functions', (done) => {
197
+ try {
198
+ wffunctions = a.iapGetAdapterWorkflowFunctions([]);
199
+
200
+ try {
201
+ assert.notEqual(0, wffunctions.length);
202
+ done();
203
+ } catch (err) {
204
+ log.error(`Test Failure: ${err}`);
205
+ done(err);
206
+ }
207
+ } catch (error) {
208
+ log.error(`Adapter Exception: ${error}`);
209
+ done(error);
210
+ }
211
+ }).timeout(attemptTimeout);
212
+ });
213
+
214
+ describe('package.json', () => {
215
+ it('should have a package.json', (done) => {
216
+ try {
217
+ fs.exists('package.json', (val) => {
218
+ assert.equal(true, val);
219
+ done();
220
+ });
221
+ } catch (error) {
222
+ log.error(`Test Failure: ${error}`);
223
+ done(error);
224
+ }
225
+ });
226
+ it('package.json should be validated', (done) => {
227
+ try {
228
+ const packageDotJson = require('../../package.json');
229
+ // Define the JSON schema for package.json
230
+ const packageJsonSchema = {
231
+ type: 'object',
232
+ properties: {
233
+ name: { type: 'string' },
234
+ version: { type: 'string' }
235
+ // May need to add more properties as needed
236
+ },
237
+ required: ['name', 'version']
238
+ };
239
+ const validate = ajv.compile(packageJsonSchema);
240
+ const isValid = validate(packageDotJson);
241
+
242
+ if (isValid === false) {
243
+ log.error('The package.json contains errors');
244
+ assert.equal(true, isValid);
245
+ } else {
246
+ assert.equal(true, isValid);
247
+ }
248
+
249
+ done();
250
+ } catch (error) {
251
+ log.error(`Test Failure: ${error}`);
252
+ done(error);
253
+ }
254
+ });
255
+ it('package.json standard fields should be customized', (done) => {
256
+ try {
257
+ const packageDotJson = require('../../package.json');
258
+ assert.notEqual(-1, packageDotJson.name.indexOf('aws_cognito_identity_provider'));
259
+ assert.notEqual(undefined, packageDotJson.version);
260
+ assert.notEqual(null, packageDotJson.version);
261
+ assert.notEqual('', packageDotJson.version);
262
+ assert.notEqual(undefined, packageDotJson.description);
263
+ assert.notEqual(null, packageDotJson.description);
264
+ assert.notEqual('', packageDotJson.description);
265
+ assert.equal('adapter.js', packageDotJson.main);
266
+ assert.notEqual(undefined, packageDotJson.wizardVersion);
267
+ assert.notEqual(null, packageDotJson.wizardVersion);
268
+ assert.notEqual('', packageDotJson.wizardVersion);
269
+ assert.notEqual(undefined, packageDotJson.engineVersion);
270
+ assert.notEqual(null, packageDotJson.engineVersion);
271
+ assert.notEqual('', packageDotJson.engineVersion);
272
+ assert.equal('http', packageDotJson.adapterType);
273
+ done();
274
+ } catch (error) {
275
+ log.error(`Test Failure: ${error}`);
276
+ done(error);
277
+ }
278
+ });
279
+ it('package.json proper scripts should be provided', (done) => {
280
+ try {
281
+ const packageDotJson = require('../../package.json');
282
+ assert.notEqual(undefined, packageDotJson.scripts);
283
+ assert.notEqual(null, packageDotJson.scripts);
284
+ assert.notEqual('', packageDotJson.scripts);
285
+ assert.equal('node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js', packageDotJson.scripts.lint);
286
+ assert.equal('node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet', packageDotJson.scripts['lint:errors']);
287
+ assert.equal('mocha test/unit/adapterBaseTestUnit.js --LOG=error', packageDotJson.scripts['test:baseunit']);
288
+ assert.equal('mocha test/unit/adapterTestUnit.js --LOG=error', packageDotJson.scripts['test:unit']);
289
+ assert.equal('mocha test/integration/adapterTestIntegration.js --LOG=error', packageDotJson.scripts['test:integration']);
290
+ assert.equal('npm run test:baseunit && npm run test:unit && npm run test:integration', packageDotJson.scripts.test);
291
+ done();
292
+ } catch (error) {
293
+ log.error(`Test Failure: ${error}`);
294
+ done(error);
295
+ }
296
+ });
297
+ it('package.json proper directories should be provided', (done) => {
298
+ try {
299
+ const packageDotJson = require('../../package.json');
300
+ assert.notEqual(undefined, packageDotJson.repository);
301
+ assert.notEqual(null, packageDotJson.repository);
302
+ assert.notEqual('', packageDotJson.repository);
303
+ done();
304
+ } catch (error) {
305
+ log.error(`Test Failure: ${error}`);
306
+ done(error);
307
+ }
308
+ });
309
+ it('package.json proper dependencies should be provided', (done) => {
310
+ try {
311
+ const packageDotJson = require('../../package.json');
312
+ assert.notEqual(undefined, packageDotJson.dependencies);
313
+ assert.notEqual(null, packageDotJson.dependencies);
314
+ assert.notEqual('', packageDotJson.dependencies);
315
+ assert.equal('^8.17.1', packageDotJson.dependencies.ajv);
316
+ assert.equal('^1.7.4', packageDotJson.dependencies.axios);
317
+ assert.equal('^11.0.0', packageDotJson.dependencies.commander);
318
+ assert.equal('^11.2.0', packageDotJson.dependencies['fs-extra']);
319
+ assert.equal('^10.7.3', packageDotJson.dependencies.mocha);
320
+ assert.equal('^2.0.1', packageDotJson.dependencies['mocha-param']);
321
+ assert.equal('^0.4.4', packageDotJson.dependencies.ping);
322
+ assert.equal('^1.4.10', packageDotJson.dependencies['readline-sync']);
323
+ assert.equal('^7.6.3', packageDotJson.dependencies.semver);
324
+ assert.equal('^3.14.2', packageDotJson.dependencies.winston);
325
+ done();
326
+ } catch (error) {
327
+ log.error(`Test Failure: ${error}`);
328
+ done(error);
329
+ }
330
+ });
331
+ it('package.json proper dev dependencies should be provided', (done) => {
332
+ try {
333
+ const packageDotJson = require('../../package.json');
334
+ assert.notEqual(undefined, packageDotJson.devDependencies);
335
+ assert.notEqual(null, packageDotJson.devDependencies);
336
+ assert.notEqual('', packageDotJson.devDependencies);
337
+ assert.equal('^4.3.7', packageDotJson.devDependencies.chai);
338
+ assert.equal('^8.44.0', packageDotJson.devDependencies.eslint);
339
+ assert.equal('^15.0.0', packageDotJson.devDependencies['eslint-config-airbnb-base']);
340
+ assert.equal('^2.27.5', packageDotJson.devDependencies['eslint-plugin-import']);
341
+ assert.equal('^3.1.0', packageDotJson.devDependencies['eslint-plugin-json']);
342
+ assert.equal('^3.18.0', packageDotJson.devDependencies.testdouble);
343
+ done();
344
+ } catch (error) {
345
+ log.error(`Test Failure: ${error}`);
346
+ done(error);
347
+ }
348
+ });
349
+ });
350
+
351
+ describe('pronghorn.json', () => {
352
+ it('should have a pronghorn.json', (done) => {
353
+ try {
354
+ fs.exists('pronghorn.json', (val) => {
355
+ assert.equal(true, val);
356
+ done();
357
+ });
358
+ } catch (error) {
359
+ log.error(`Test Failure: ${error}`);
360
+ done(error);
361
+ }
362
+ });
363
+ it('pronghorn.json should be customized', (done) => {
364
+ try {
365
+ const pronghornDotJson = require('../../pronghorn.json');
366
+ assert.notEqual(-1, pronghornDotJson.id.indexOf('aws_cognito_identity_provider'));
367
+ assert.equal('Adapter', pronghornDotJson.type);
368
+ assert.equal('AwsCognitoIdentityProvider', pronghornDotJson.export);
369
+ assert.equal('Aws_cognito_identity_provider', pronghornDotJson.title);
370
+ assert.equal('adapter.js', pronghornDotJson.src);
371
+ done();
372
+ } catch (error) {
373
+ log.error(`Test Failure: ${error}`);
374
+ done(error);
375
+ }
376
+ });
377
+ it('pronghorn.json should contain generic adapter methods', (done) => {
378
+ try {
379
+ const pronghornDotJson = require('../../pronghorn.json');
380
+ assert.notEqual(undefined, pronghornDotJson.methods);
381
+ assert.notEqual(null, pronghornDotJson.methods);
382
+ assert.notEqual('', pronghornDotJson.methods);
383
+ assert.equal(true, Array.isArray(pronghornDotJson.methods));
384
+ assert.notEqual(0, pronghornDotJson.methods.length);
385
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapUpdateAdapterConfiguration'));
386
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapSuspendAdapter'));
387
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapUnsuspendAdapter'));
388
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapGetAdapterQueue'));
389
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapFindAdapterPath'));
390
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapTroubleshootAdapter'));
391
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterHealthcheck'));
392
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterConnectivity'));
393
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterBasicGet'));
394
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapMoveAdapterEntitiesToDB'));
395
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapDeactivateTasks'));
396
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapActivateTasks'));
397
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapPopulateEntityCache'));
398
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRetrieveEntitiesCache'));
399
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'getDevice'));
400
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'getDevicesFiltered'));
401
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'isAlive'));
402
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'getConfig'));
403
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapGetDeviceCount'));
404
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapExpandedGenericAdapterRequest'));
405
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'genericAdapterRequest'));
406
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'genericAdapterRequestNoBasePath'));
407
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterLint'));
408
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterTests'));
409
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapGetAdapterInventory'));
410
+ done();
411
+ } catch (error) {
412
+ log.error(`Test Failure: ${error}`);
413
+ done(error);
414
+ }
415
+ });
416
+ it('pronghorn.json should only expose workflow functions', (done) => {
417
+ try {
418
+ const pronghornDotJson = require('../../pronghorn.json');
419
+
420
+ for (let m = 0; m < pronghornDotJson.methods.length; m += 1) {
421
+ let found = false;
422
+ let paramissue = false;
423
+
424
+ for (let w = 0; w < wffunctions.length; w += 1) {
425
+ if (pronghornDotJson.methods[m].name === wffunctions[w]) {
426
+ found = true;
427
+ const methLine = execute(`grep " ${wffunctions[w]}(" adapter.js | grep "callback) {"`).toString();
428
+ let wfparams = [];
429
+
430
+ if (methLine && methLine.indexOf('(') >= 0 && methLine.indexOf(')') >= 0) {
431
+ const temp = methLine.substring(methLine.indexOf('(') + 1, methLine.lastIndexOf(')'));
432
+ wfparams = temp.split(',');
433
+
434
+ for (let t = 0; t < wfparams.length; t += 1) {
435
+ // remove default value from the parameter name
436
+ wfparams[t] = wfparams[t].substring(0, wfparams[t].search(/=/) > 0 ? wfparams[t].search(/#|\?|=/) : wfparams[t].length);
437
+ // remove spaces
438
+ wfparams[t] = wfparams[t].trim();
439
+
440
+ if (wfparams[t] === 'callback') {
441
+ wfparams.splice(t, 1);
442
+ }
443
+ }
444
+ }
445
+
446
+ // if there are inputs defined but not on the method line
447
+ if (wfparams.length === 0 && (pronghornDotJson.methods[m].input
448
+ && pronghornDotJson.methods[m].input.length > 0)) {
449
+ paramissue = true;
450
+ } else if (wfparams.length > 0 && (!pronghornDotJson.methods[m].input
451
+ || pronghornDotJson.methods[m].input.length === 0)) {
452
+ // if there are no inputs defined but there are on the method line
453
+ paramissue = true;
454
+ } else {
455
+ for (let p = 0; p < pronghornDotJson.methods[m].input.length; p += 1) {
456
+ let pfound = false;
457
+ for (let wfp = 0; wfp < wfparams.length; wfp += 1) {
458
+ if (pronghornDotJson.methods[m].input[p].name.toUpperCase() === wfparams[wfp].toUpperCase()) {
459
+ pfound = true;
460
+ }
461
+ }
462
+
463
+ if (!pfound) {
464
+ paramissue = true;
465
+ }
466
+ }
467
+ for (let wfp = 0; wfp < wfparams.length; wfp += 1) {
468
+ let pfound = false;
469
+ for (let p = 0; p < pronghornDotJson.methods[m].input.length; p += 1) {
470
+ if (pronghornDotJson.methods[m].input[p].name.toUpperCase() === wfparams[wfp].toUpperCase()) {
471
+ pfound = true;
472
+ }
473
+ }
474
+
475
+ if (!pfound) {
476
+ paramissue = true;
477
+ }
478
+ }
479
+ }
480
+
481
+ break;
482
+ }
483
+ }
484
+
485
+ if (!found) {
486
+ // this is the reason to go through both loops - log which ones are not found so
487
+ // they can be worked
488
+ log.error(`${pronghornDotJson.methods[m].name} not found in workflow functions`);
489
+ }
490
+ if (paramissue) {
491
+ // this is the reason to go through both loops - log which ones are not found so
492
+ // they can be worked
493
+ log.error(`${pronghornDotJson.methods[m].name} has a parameter mismatch`);
494
+ }
495
+ assert.equal(true, found);
496
+ assert.equal(false, paramissue);
497
+ }
498
+ done();
499
+ } catch (error) {
500
+ log.error(`Adapter Exception: ${error}`);
501
+ done(error);
502
+ }
503
+ }).timeout(attemptTimeout);
504
+ it('pronghorn.json should expose all workflow functions', (done) => {
505
+ try {
506
+ const pronghornDotJson = require('../../pronghorn.json');
507
+ for (let w = 0; w < wffunctions.length; w += 1) {
508
+ let found = false;
509
+
510
+ for (let m = 0; m < pronghornDotJson.methods.length; m += 1) {
511
+ if (pronghornDotJson.methods[m].name === wffunctions[w]) {
512
+ found = true;
513
+ break;
514
+ }
515
+ }
516
+
517
+ if (!found) {
518
+ // this is the reason to go through both loops - log which ones are not found so
519
+ // they can be worked
520
+ log.error(`${wffunctions[w]} not found in pronghorn.json`);
521
+ }
522
+ assert.equal(true, found);
523
+ }
524
+ done();
525
+ } catch (error) {
526
+ log.error(`Adapter Exception: ${error}`);
527
+ done(error);
528
+ }
529
+ });
530
+ it('pronghorn.json verify input/output schema objects', (done) => {
531
+ const verifySchema = (methodName, schema) => {
532
+ try {
533
+ ajv.compile(schema);
534
+ } catch (error) {
535
+ const errorMessage = `Invalid schema found in '${methodName}' method.
536
+ Schema => ${JSON.stringify(schema)}.
537
+ Details => ${error.message}`;
538
+ throw new Error(errorMessage);
539
+ }
540
+ };
541
+
542
+ try {
543
+ const pronghornDotJson = require('../../pronghorn.json');
544
+ const { methods } = pronghornDotJson;
545
+ for (let i = 0; i < methods.length; i += 1) {
546
+ for (let j = 0; j < methods[i].input.length; j += 1) {
547
+ const inputSchema = methods[i].input[j].schema;
548
+ if (inputSchema) {
549
+ verifySchema(methods[i].name, inputSchema);
550
+ }
551
+ }
552
+ const outputSchema = methods[i].output.schema;
553
+ if (outputSchema) {
554
+ verifySchema(methods[i].name, outputSchema);
555
+ }
556
+ }
557
+ done();
558
+ } catch (error) {
559
+ log.error(`Adapter Exception: ${error}`);
560
+ done(error);
561
+ }
562
+ }).timeout(attemptTimeout);
563
+ });
564
+
565
+ describe('propertiesSchema.json', () => {
566
+ it('should have a propertiesSchema.json', (done) => {
567
+ try {
568
+ fs.exists('propertiesSchema.json', (val) => {
569
+ assert.equal(true, val);
570
+ done();
571
+ });
572
+ } catch (error) {
573
+ log.error(`Test Failure: ${error}`);
574
+ done(error);
575
+ }
576
+ });
577
+ it('propertiesSchema.json should be customized', (done) => {
578
+ try {
579
+ const propertiesDotJson = require('../../propertiesSchema.json');
580
+ assert.equal('adapter-aws_cognito_identity_provider', propertiesDotJson.$id);
581
+ assert.equal('object', propertiesDotJson.type);
582
+ assert.equal('http://json-schema.org/draft-07/schema#', propertiesDotJson.$schema);
583
+ done();
584
+ } catch (error) {
585
+ log.error(`Test Failure: ${error}`);
586
+ done(error);
587
+ }
588
+ });
589
+ it('propertiesSchema.json should contain generic adapter properties', (done) => {
590
+ try {
591
+ const propertiesDotJson = require('../../propertiesSchema.json');
592
+ assert.notEqual(undefined, propertiesDotJson.properties);
593
+ assert.notEqual(null, propertiesDotJson.properties);
594
+ assert.notEqual('', propertiesDotJson.properties);
595
+ assert.equal('string', propertiesDotJson.properties.host.type);
596
+ assert.equal('integer', propertiesDotJson.properties.port.type);
597
+ assert.equal('boolean', propertiesDotJson.properties.stub.type);
598
+ assert.equal('string', propertiesDotJson.properties.protocol.type);
599
+ assert.notEqual(undefined, propertiesDotJson.definitions.authentication);
600
+ assert.notEqual(null, propertiesDotJson.definitions.authentication);
601
+ assert.notEqual('', propertiesDotJson.definitions.authentication);
602
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.auth_method.type);
603
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.username.type);
604
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.password.type);
605
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.token.type);
606
+ assert.equal('integer', propertiesDotJson.definitions.authentication.properties.invalid_token_error.type);
607
+ assert.equal('integer', propertiesDotJson.definitions.authentication.properties.token_timeout.type);
608
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.token_cache.type);
609
+ assert.equal(true, Array.isArray(propertiesDotJson.definitions.authentication.properties.auth_field.type));
610
+ assert.equal(true, Array.isArray(propertiesDotJson.definitions.authentication.properties.auth_field_format.type));
611
+ assert.equal('boolean', propertiesDotJson.definitions.authentication.properties.auth_logging.type);
612
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.client_id.type);
613
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.client_secret.type);
614
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.grant_type.type);
615
+ assert.notEqual(undefined, propertiesDotJson.definitions.ssl);
616
+ assert.notEqual(null, propertiesDotJson.definitions.ssl);
617
+ assert.notEqual('', propertiesDotJson.definitions.ssl);
618
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.ecdhCurve.type);
619
+ assert.equal('boolean', propertiesDotJson.definitions.ssl.properties.enabled.type);
620
+ assert.equal('boolean', propertiesDotJson.definitions.ssl.properties.accept_invalid_cert.type);
621
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.ca_file.type);
622
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.key_file.type);
623
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.cert_file.type);
624
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.secure_protocol.type);
625
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.ciphers.type);
626
+ assert.equal('string', propertiesDotJson.properties.base_path.type);
627
+ assert.equal('string', propertiesDotJson.properties.version.type);
628
+ assert.equal('string', propertiesDotJson.properties.cache_location.type);
629
+ assert.equal('boolean', propertiesDotJson.properties.encode_pathvars.type);
630
+ assert.equal('boolean', propertiesDotJson.properties.encode_queryvars.type);
631
+ assert.equal(true, Array.isArray(propertiesDotJson.properties.save_metric.type));
632
+ assert.notEqual(undefined, propertiesDotJson.definitions);
633
+ assert.notEqual(null, propertiesDotJson.definitions);
634
+ assert.notEqual('', propertiesDotJson.definitions);
635
+ assert.notEqual(undefined, propertiesDotJson.definitions.healthcheck);
636
+ assert.notEqual(null, propertiesDotJson.definitions.healthcheck);
637
+ assert.notEqual('', propertiesDotJson.definitions.healthcheck);
638
+ assert.equal('string', propertiesDotJson.definitions.healthcheck.properties.type.type);
639
+ assert.equal('integer', propertiesDotJson.definitions.healthcheck.properties.frequency.type);
640
+ assert.equal('object', propertiesDotJson.definitions.healthcheck.properties.query_object.type);
641
+ assert.notEqual(undefined, propertiesDotJson.definitions.throttle);
642
+ assert.notEqual(null, propertiesDotJson.definitions.throttle);
643
+ assert.notEqual('', propertiesDotJson.definitions.throttle);
644
+ assert.equal('boolean', propertiesDotJson.definitions.throttle.properties.throttle_enabled.type);
645
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.number_pronghorns.type);
646
+ assert.equal('string', propertiesDotJson.definitions.throttle.properties.sync_async.type);
647
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.max_in_queue.type);
648
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.concurrent_max.type);
649
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.expire_timeout.type);
650
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.avg_runtime.type);
651
+ assert.equal('array', propertiesDotJson.definitions.throttle.properties.priorities.type);
652
+ assert.notEqual(undefined, propertiesDotJson.definitions.request);
653
+ assert.notEqual(null, propertiesDotJson.definitions.request);
654
+ assert.notEqual('', propertiesDotJson.definitions.request);
655
+ assert.equal('integer', propertiesDotJson.definitions.request.properties.number_redirects.type);
656
+ assert.equal('integer', propertiesDotJson.definitions.request.properties.number_retries.type);
657
+ assert.equal(true, Array.isArray(propertiesDotJson.definitions.request.properties.limit_retry_error.type));
658
+ assert.equal('array', propertiesDotJson.definitions.request.properties.failover_codes.type);
659
+ assert.equal('integer', propertiesDotJson.definitions.request.properties.attempt_timeout.type);
660
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.type);
661
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.payload.type);
662
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.uriOptions.type);
663
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.addlHeaders.type);
664
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.authData.type);
665
+ assert.equal('boolean', propertiesDotJson.definitions.request.properties.healthcheck_on_timeout.type);
666
+ assert.equal('boolean', propertiesDotJson.definitions.request.properties.return_raw.type);
667
+ assert.equal('boolean', propertiesDotJson.definitions.request.properties.archiving.type);
668
+ assert.equal('boolean', propertiesDotJson.definitions.request.properties.return_request.type);
669
+ assert.notEqual(undefined, propertiesDotJson.definitions.proxy);
670
+ assert.notEqual(null, propertiesDotJson.definitions.proxy);
671
+ assert.notEqual('', propertiesDotJson.definitions.proxy);
672
+ assert.equal('boolean', propertiesDotJson.definitions.proxy.properties.enabled.type);
673
+ assert.equal('string', propertiesDotJson.definitions.proxy.properties.host.type);
674
+ assert.equal('integer', propertiesDotJson.definitions.proxy.properties.port.type);
675
+ assert.equal('string', propertiesDotJson.definitions.proxy.properties.protocol.type);
676
+ assert.equal('string', propertiesDotJson.definitions.proxy.properties.username.type);
677
+ assert.equal('string', propertiesDotJson.definitions.proxy.properties.password.type);
678
+ assert.notEqual(undefined, propertiesDotJson.definitions.mongo);
679
+ assert.notEqual(null, propertiesDotJson.definitions.mongo);
680
+ assert.notEqual('', propertiesDotJson.definitions.mongo);
681
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.host.type);
682
+ assert.equal('integer', propertiesDotJson.definitions.mongo.properties.port.type);
683
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.database.type);
684
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.username.type);
685
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.password.type);
686
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.replSet.type);
687
+ assert.equal('object', propertiesDotJson.definitions.mongo.properties.db_ssl.type);
688
+ assert.equal('boolean', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.enabled.type);
689
+ assert.equal('boolean', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.accept_invalid_cert.type);
690
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.ca_file.type);
691
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.key_file.type);
692
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.cert_file.type);
693
+ assert.notEqual('', propertiesDotJson.definitions.devicebroker);
694
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getDevice.type);
695
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getDevicesFiltered.type);
696
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.isAlive.type);
697
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getConfig.type);
698
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getCount.type);
699
+ done();
700
+ } catch (error) {
701
+ log.error(`Test Failure: ${error}`);
702
+ done(error);
703
+ }
704
+ });
705
+ });
706
+
707
+ describe('error.json', () => {
708
+ it('should have an error.json', (done) => {
709
+ try {
710
+ fs.exists('error.json', (val) => {
711
+ assert.equal(true, val);
712
+ done();
713
+ });
714
+ } catch (error) {
715
+ log.error(`Test Failure: ${error}`);
716
+ done(error);
717
+ }
718
+ });
719
+ it('error.json should have standard adapter errors', (done) => {
720
+ try {
721
+ const errorDotJson = require('../../error.json');
722
+ assert.notEqual(undefined, errorDotJson.errors);
723
+ assert.notEqual(null, errorDotJson.errors);
724
+ assert.notEqual('', errorDotJson.errors);
725
+ assert.equal(true, Array.isArray(errorDotJson.errors));
726
+ assert.notEqual(0, errorDotJson.errors.length);
727
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.100'));
728
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.101'));
729
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.102'));
730
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.110'));
731
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.111'));
732
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.112'));
733
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.113'));
734
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.114'));
735
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.115'));
736
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.116'));
737
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.300'));
738
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.301'));
739
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.302'));
740
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.303'));
741
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.304'));
742
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.305'));
743
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.310'));
744
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.311'));
745
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.312'));
746
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.320'));
747
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.321'));
748
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.400'));
749
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.401'));
750
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.402'));
751
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.500'));
752
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.501'));
753
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.502'));
754
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.503'));
755
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.600'));
756
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.900'));
757
+ done();
758
+ } catch (error) {
759
+ log.error(`Test Failure: ${error}`);
760
+ done(error);
761
+ }
762
+ });
763
+ });
764
+
765
+ describe('sampleProperties.json', () => {
766
+ it('should have a sampleProperties.json', (done) => {
767
+ try {
768
+ fs.exists('sampleProperties.json', (val) => {
769
+ assert.equal(true, val);
770
+ done();
771
+ });
772
+ } catch (error) {
773
+ log.error(`Test Failure: ${error}`);
774
+ done(error);
775
+ }
776
+ });
777
+ it('sampleProperties.json should contain generic adapter properties', (done) => {
778
+ try {
779
+ const sampleDotJson = require('../../sampleProperties.json');
780
+ assert.notEqual(-1, sampleDotJson.id.indexOf('aws_cognito_identity_provider'));
781
+ assert.equal('AwsCognitoIdentityProvider', sampleDotJson.type);
782
+ assert.notEqual(undefined, sampleDotJson.properties);
783
+ assert.notEqual(null, sampleDotJson.properties);
784
+ assert.notEqual('', sampleDotJson.properties);
785
+ assert.notEqual(undefined, sampleDotJson.properties.host);
786
+ assert.notEqual(undefined, sampleDotJson.properties.port);
787
+ assert.notEqual(undefined, sampleDotJson.properties.stub);
788
+ assert.notEqual(undefined, sampleDotJson.properties.protocol);
789
+ assert.notEqual(undefined, sampleDotJson.properties.authentication);
790
+ assert.notEqual(null, sampleDotJson.properties.authentication);
791
+ assert.notEqual('', sampleDotJson.properties.authentication);
792
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_method);
793
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.username);
794
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.password);
795
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.token);
796
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.invalid_token_error);
797
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.token_timeout);
798
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.token_cache);
799
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_field);
800
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_field_format);
801
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_logging);
802
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.client_id);
803
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.client_secret);
804
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.grant_type);
805
+ assert.notEqual(undefined, sampleDotJson.properties.ssl);
806
+ assert.notEqual(null, sampleDotJson.properties.ssl);
807
+ assert.notEqual('', sampleDotJson.properties.ssl);
808
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.ecdhCurve);
809
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.enabled);
810
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.accept_invalid_cert);
811
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.ca_file);
812
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.key_file);
813
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.cert_file);
814
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.secure_protocol);
815
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.ciphers);
816
+ assert.notEqual(undefined, sampleDotJson.properties.base_path);
817
+ assert.notEqual(undefined, sampleDotJson.properties.version);
818
+ assert.notEqual(undefined, sampleDotJson.properties.cache_location);
819
+ assert.notEqual(undefined, sampleDotJson.properties.encode_pathvars);
820
+ assert.notEqual(undefined, sampleDotJson.properties.encode_queryvars);
821
+ assert.notEqual(undefined, sampleDotJson.properties.save_metric);
822
+ assert.notEqual(undefined, sampleDotJson.properties.healthcheck);
823
+ assert.notEqual(null, sampleDotJson.properties.healthcheck);
824
+ assert.notEqual('', sampleDotJson.properties.healthcheck);
825
+ assert.notEqual(undefined, sampleDotJson.properties.healthcheck.type);
826
+ assert.notEqual(undefined, sampleDotJson.properties.healthcheck.frequency);
827
+ assert.notEqual(undefined, sampleDotJson.properties.healthcheck.query_object);
828
+ assert.notEqual(undefined, sampleDotJson.properties.throttle);
829
+ assert.notEqual(null, sampleDotJson.properties.throttle);
830
+ assert.notEqual('', sampleDotJson.properties.throttle);
831
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.throttle_enabled);
832
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.number_pronghorns);
833
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.sync_async);
834
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.max_in_queue);
835
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.concurrent_max);
836
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.expire_timeout);
837
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.avg_runtime);
838
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.priorities);
839
+ assert.notEqual(undefined, sampleDotJson.properties.request);
840
+ assert.notEqual(null, sampleDotJson.properties.request);
841
+ assert.notEqual('', sampleDotJson.properties.request);
842
+ assert.notEqual(undefined, sampleDotJson.properties.request.number_redirects);
843
+ assert.notEqual(undefined, sampleDotJson.properties.request.number_retries);
844
+ assert.notEqual(undefined, sampleDotJson.properties.request.limit_retry_error);
845
+ assert.notEqual(undefined, sampleDotJson.properties.request.failover_codes);
846
+ assert.notEqual(undefined, sampleDotJson.properties.request.attempt_timeout);
847
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request);
848
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request.payload);
849
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request.uriOptions);
850
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request.addlHeaders);
851
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request.authData);
852
+ assert.notEqual(undefined, sampleDotJson.properties.request.healthcheck_on_timeout);
853
+ assert.notEqual(undefined, sampleDotJson.properties.request.return_raw);
854
+ assert.notEqual(undefined, sampleDotJson.properties.request.archiving);
855
+ assert.notEqual(undefined, sampleDotJson.properties.request.return_request);
856
+ assert.notEqual(undefined, sampleDotJson.properties.proxy);
857
+ assert.notEqual(null, sampleDotJson.properties.proxy);
858
+ assert.notEqual('', sampleDotJson.properties.proxy);
859
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.enabled);
860
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.host);
861
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.port);
862
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.protocol);
863
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.username);
864
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.password);
865
+ assert.notEqual(undefined, sampleDotJson.properties.mongo);
866
+ assert.notEqual(null, sampleDotJson.properties.mongo);
867
+ assert.notEqual('', sampleDotJson.properties.mongo);
868
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.host);
869
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.port);
870
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.database);
871
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.username);
872
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.password);
873
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.replSet);
874
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl);
875
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.enabled);
876
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.accept_invalid_cert);
877
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.ca_file);
878
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.key_file);
879
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.cert_file);
880
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker);
881
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.getDevice);
882
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.getDevicesFiltered);
883
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.isAlive);
884
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.getConfig);
885
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.getCount);
886
+ assert.notEqual(undefined, sampleDotJson.properties.cache);
887
+ assert.notEqual(undefined, sampleDotJson.properties.cache.entities);
888
+ done();
889
+ } catch (error) {
890
+ log.error(`Test Failure: ${error}`);
891
+ done(error);
892
+ }
893
+ });
894
+ });
895
+
896
+ describe('#checkProperties', () => {
897
+ it('should have a checkProperties function', (done) => {
898
+ try {
899
+ assert.equal(true, typeof a.checkProperties === 'function');
900
+ done();
901
+ } catch (error) {
902
+ log.error(`Test Failure: ${error}`);
903
+ done(error);
904
+ }
905
+ });
906
+ it('the sample properties should be good - if failure change the log level', (done) => {
907
+ try {
908
+ const samplePropsJson = require('../../sampleProperties.json');
909
+ const clean = a.checkProperties(samplePropsJson.properties);
910
+
911
+ try {
912
+ assert.notEqual(0, Object.keys(clean));
913
+ assert.equal(undefined, clean.exception);
914
+ assert.notEqual(undefined, clean.host);
915
+ assert.notEqual(null, clean.host);
916
+ assert.notEqual('', clean.host);
917
+ done();
918
+ } catch (err) {
919
+ log.error(`Test Failure: ${err}`);
920
+ done(err);
921
+ }
922
+ } catch (error) {
923
+ log.error(`Adapter Exception: ${error}`);
924
+ done(error);
925
+ }
926
+ }).timeout(attemptTimeout);
927
+ });
928
+
929
+ describe('README.md', () => {
930
+ it('should have a README', (done) => {
931
+ try {
932
+ fs.exists('README.md', (val) => {
933
+ assert.equal(true, val);
934
+ done();
935
+ });
936
+ } catch (error) {
937
+ log.error(`Test Failure: ${error}`);
938
+ done(error);
939
+ }
940
+ });
941
+ it('README.md should be customized', (done) => {
942
+ try {
943
+ fs.readFile('README.md', 'utf8', (err, data) => {
944
+ assert.equal(-1, data.indexOf('[System]'));
945
+ assert.equal(-1, data.indexOf('[system]'));
946
+ assert.equal(-1, data.indexOf('[version]'));
947
+ assert.equal(-1, data.indexOf('[namespace]'));
948
+ done();
949
+ });
950
+ } catch (error) {
951
+ log.error(`Test Failure: ${error}`);
952
+ done(error);
953
+ }
954
+ });
955
+ });
956
+
957
+ describe('#connect', () => {
958
+ it('should have a connect function', (done) => {
959
+ try {
960
+ assert.equal(true, typeof a.connect === 'function');
961
+ done();
962
+ } catch (error) {
963
+ log.error(`Test Failure: ${error}`);
964
+ done(error);
965
+ }
966
+ });
967
+ });
968
+
969
+ describe('#healthCheck', () => {
970
+ it('should have a healthCheck function', (done) => {
971
+ try {
972
+ assert.equal(true, typeof a.healthCheck === 'function');
973
+ done();
974
+ } catch (error) {
975
+ log.error(`Test Failure: ${error}`);
976
+ done(error);
977
+ }
978
+ });
979
+ });
980
+
981
+ describe('#iapUpdateAdapterConfiguration', () => {
982
+ it('should have a iapUpdateAdapterConfiguration function', (done) => {
983
+ try {
984
+ assert.equal(true, typeof a.iapUpdateAdapterConfiguration === 'function');
985
+ done();
986
+ } catch (error) {
987
+ log.error(`Test Failure: ${error}`);
988
+ done(error);
989
+ }
990
+ });
991
+ });
992
+
993
+ describe('#iapSuspendAdapter', () => {
994
+ it('should have a iapSuspendAdapter function', (done) => {
995
+ try {
996
+ assert.equal(true, typeof a.iapSuspendAdapter === 'function');
997
+ done();
998
+ } catch (error) {
999
+ log.error(`Test Failure: ${error}`);
1000
+ done(error);
1001
+ }
1002
+ });
1003
+ });
1004
+
1005
+ describe('#iapUnsuspendAdapter', () => {
1006
+ it('should have a iapUnsuspendAdapter function', (done) => {
1007
+ try {
1008
+ assert.equal(true, typeof a.iapUnsuspendAdapter === 'function');
1009
+ done();
1010
+ } catch (error) {
1011
+ log.error(`Test Failure: ${error}`);
1012
+ done(error);
1013
+ }
1014
+ });
1015
+ });
1016
+
1017
+ describe('#iapGetAdapterQueue', () => {
1018
+ it('should have a iapGetAdapterQueue function', (done) => {
1019
+ try {
1020
+ assert.equal(true, typeof a.iapGetAdapterQueue === 'function');
1021
+ done();
1022
+ } catch (error) {
1023
+ log.error(`Test Failure: ${error}`);
1024
+ done(error);
1025
+ }
1026
+ });
1027
+ });
1028
+
1029
+ describe('#iapFindAdapterPath', () => {
1030
+ it('should have a iapFindAdapterPath function', (done) => {
1031
+ try {
1032
+ assert.equal(true, typeof a.iapFindAdapterPath === 'function');
1033
+ done();
1034
+ } catch (error) {
1035
+ log.error(`Test Failure: ${error}`);
1036
+ done(error);
1037
+ }
1038
+ });
1039
+ it('iapFindAdapterPath should find atleast one path that matches', (done) => {
1040
+ try {
1041
+ a.iapFindAdapterPath('{base_path}/{version}', (data, error) => {
1042
+ try {
1043
+ assert.equal(undefined, error);
1044
+ assert.notEqual(undefined, data);
1045
+ assert.notEqual(null, data);
1046
+ assert.equal(true, data.found);
1047
+ assert.notEqual(undefined, data.foundIn);
1048
+ assert.notEqual(null, data.foundIn);
1049
+ assert.notEqual(0, data.foundIn.length);
1050
+ done();
1051
+ } catch (err) {
1052
+ log.error(`Test Failure: ${err}`);
1053
+ done(err);
1054
+ }
1055
+ });
1056
+ } catch (error) {
1057
+ log.error(`Adapter Exception: ${error}`);
1058
+ done(error);
1059
+ }
1060
+ }).timeout(attemptTimeout);
1061
+ });
1062
+
1063
+ describe('#iapTroubleshootAdapter', () => {
1064
+ it('should have a iapTroubleshootAdapter function', (done) => {
1065
+ try {
1066
+ assert.equal(true, typeof a.iapTroubleshootAdapter === 'function');
1067
+ done();
1068
+ } catch (error) {
1069
+ log.error(`Test Failure: ${error}`);
1070
+ done(error);
1071
+ }
1072
+ });
1073
+ });
1074
+
1075
+ describe('#iapRunAdapterHealthcheck', () => {
1076
+ it('should have a iapRunAdapterHealthcheck function', (done) => {
1077
+ try {
1078
+ assert.equal(true, typeof a.iapRunAdapterHealthcheck === 'function');
1079
+ done();
1080
+ } catch (error) {
1081
+ log.error(`Test Failure: ${error}`);
1082
+ done(error);
1083
+ }
1084
+ });
1085
+ });
1086
+
1087
+ describe('#iapRunAdapterConnectivity', () => {
1088
+ it('should have a iapRunAdapterConnectivity function', (done) => {
1089
+ try {
1090
+ assert.equal(true, typeof a.iapRunAdapterConnectivity === 'function');
1091
+ done();
1092
+ } catch (error) {
1093
+ log.error(`Test Failure: ${error}`);
1094
+ done(error);
1095
+ }
1096
+ });
1097
+ });
1098
+
1099
+ describe('#iapRunAdapterBasicGet', () => {
1100
+ it('should have a iapRunAdapterBasicGet function', (done) => {
1101
+ try {
1102
+ assert.equal(true, typeof a.iapRunAdapterBasicGet === 'function');
1103
+ done();
1104
+ } catch (error) {
1105
+ log.error(`Test Failure: ${error}`);
1106
+ done(error);
1107
+ }
1108
+ });
1109
+ });
1110
+
1111
+ describe('#iapMoveAdapterEntitiesToDB', () => {
1112
+ it('should have a iapMoveAdapterEntitiesToDB function', (done) => {
1113
+ try {
1114
+ assert.equal(true, typeof a.iapMoveAdapterEntitiesToDB === 'function');
1115
+ done();
1116
+ } catch (error) {
1117
+ log.error(`Test Failure: ${error}`);
1118
+ done(error);
1119
+ }
1120
+ });
1121
+ });
1122
+
1123
+ describe('#checkActionFiles', () => {
1124
+ it('should have a checkActionFiles function', (done) => {
1125
+ try {
1126
+ assert.equal(true, typeof a.checkActionFiles === 'function');
1127
+ done();
1128
+ } catch (error) {
1129
+ log.error(`Test Failure: ${error}`);
1130
+ done(error);
1131
+ }
1132
+ });
1133
+ it('the action files should be good - if failure change the log level as most issues are warnings', (done) => {
1134
+ try {
1135
+ const clean = a.checkActionFiles();
1136
+
1137
+ try {
1138
+ for (let c = 0; c < clean.length; c += 1) {
1139
+ log.error(clean[c]);
1140
+ }
1141
+ assert.equal(0, clean.length);
1142
+ done();
1143
+ } catch (err) {
1144
+ log.error(`Test Failure: ${err}`);
1145
+ done(err);
1146
+ }
1147
+ } catch (error) {
1148
+ log.error(`Adapter Exception: ${error}`);
1149
+ done(error);
1150
+ }
1151
+ }).timeout(attemptTimeout);
1152
+ });
1153
+
1154
+ describe('#encryptProperty', () => {
1155
+ it('should have a encryptProperty function', (done) => {
1156
+ try {
1157
+ assert.equal(true, typeof a.encryptProperty === 'function');
1158
+ done();
1159
+ } catch (error) {
1160
+ log.error(`Test Failure: ${error}`);
1161
+ done(error);
1162
+ }
1163
+ });
1164
+ it('should get base64 encoded property', (done) => {
1165
+ try {
1166
+ a.encryptProperty('testing', 'base64', (data, error) => {
1167
+ try {
1168
+ assert.equal(undefined, error);
1169
+ assert.notEqual(undefined, data);
1170
+ assert.notEqual(null, data);
1171
+ assert.notEqual(undefined, data.response);
1172
+ assert.notEqual(null, data.response);
1173
+ assert.equal(0, data.response.indexOf('{code}'));
1174
+ done();
1175
+ } catch (err) {
1176
+ log.error(`Test Failure: ${err}`);
1177
+ done(err);
1178
+ }
1179
+ });
1180
+ } catch (error) {
1181
+ log.error(`Adapter Exception: ${error}`);
1182
+ done(error);
1183
+ }
1184
+ }).timeout(attemptTimeout);
1185
+ it('should get encrypted property', (done) => {
1186
+ try {
1187
+ a.encryptProperty('testing', 'encrypt', (data, error) => {
1188
+ try {
1189
+ assert.equal(undefined, error);
1190
+ assert.notEqual(undefined, data);
1191
+ assert.notEqual(null, data);
1192
+ assert.notEqual(undefined, data.response);
1193
+ assert.notEqual(null, data.response);
1194
+ assert.equal(0, data.response.indexOf('{crypt}'));
1195
+ done();
1196
+ } catch (err) {
1197
+ log.error(`Test Failure: ${err}`);
1198
+ done(err);
1199
+ }
1200
+ });
1201
+ } catch (error) {
1202
+ log.error(`Adapter Exception: ${error}`);
1203
+ done(error);
1204
+ }
1205
+ }).timeout(attemptTimeout);
1206
+ });
1207
+
1208
+ describe('#iapDeactivateTasks', () => {
1209
+ it('should have a iapDeactivateTasks function', (done) => {
1210
+ try {
1211
+ assert.equal(true, typeof a.iapDeactivateTasks === 'function');
1212
+ done();
1213
+ } catch (error) {
1214
+ log.error(`Test Failure: ${error}`);
1215
+ done(error);
1216
+ }
1217
+ });
1218
+ });
1219
+
1220
+ describe('#iapActivateTasks', () => {
1221
+ it('should have a iapActivateTasks function', (done) => {
1222
+ try {
1223
+ assert.equal(true, typeof a.iapActivateTasks === 'function');
1224
+ done();
1225
+ } catch (error) {
1226
+ log.error(`Test Failure: ${error}`);
1227
+ done(error);
1228
+ }
1229
+ });
1230
+ });
1231
+
1232
+ describe('#iapPopulateEntityCache', () => {
1233
+ it('should have a iapPopulateEntityCache function', (done) => {
1234
+ try {
1235
+ assert.equal(true, typeof a.iapPopulateEntityCache === 'function');
1236
+ done();
1237
+ } catch (error) {
1238
+ log.error(`Test Failure: ${error}`);
1239
+ done(error);
1240
+ }
1241
+ });
1242
+ });
1243
+
1244
+ describe('#iapRetrieveEntitiesCache', () => {
1245
+ it('should have a iapRetrieveEntitiesCache function', (done) => {
1246
+ try {
1247
+ assert.equal(true, typeof a.iapRetrieveEntitiesCache === 'function');
1248
+ done();
1249
+ } catch (error) {
1250
+ log.error(`Test Failure: ${error}`);
1251
+ done(error);
1252
+ }
1253
+ });
1254
+ });
1255
+
1256
+ describe('#hasEntities', () => {
1257
+ it('should have a hasEntities function', (done) => {
1258
+ try {
1259
+ assert.equal(true, typeof a.hasEntities === 'function');
1260
+ done();
1261
+ } catch (error) {
1262
+ log.error(`Test Failure: ${error}`);
1263
+ done(error);
1264
+ }
1265
+ });
1266
+ });
1267
+
1268
+ describe('#getDevice', () => {
1269
+ it('should have a getDevice function', (done) => {
1270
+ try {
1271
+ assert.equal(true, typeof a.getDevice === 'function');
1272
+ done();
1273
+ } catch (error) {
1274
+ log.error(`Test Failure: ${error}`);
1275
+ done(error);
1276
+ }
1277
+ });
1278
+ });
1279
+
1280
+ describe('#getDevicesFiltered', () => {
1281
+ it('should have a getDevicesFiltered function', (done) => {
1282
+ try {
1283
+ assert.equal(true, typeof a.getDevicesFiltered === 'function');
1284
+ done();
1285
+ } catch (error) {
1286
+ log.error(`Test Failure: ${error}`);
1287
+ done(error);
1288
+ }
1289
+ });
1290
+ });
1291
+
1292
+ describe('#isAlive', () => {
1293
+ it('should have a isAlive function', (done) => {
1294
+ try {
1295
+ assert.equal(true, typeof a.isAlive === 'function');
1296
+ done();
1297
+ } catch (error) {
1298
+ log.error(`Test Failure: ${error}`);
1299
+ done(error);
1300
+ }
1301
+ });
1302
+ });
1303
+
1304
+ describe('#getConfig', () => {
1305
+ it('should have a getConfig function', (done) => {
1306
+ try {
1307
+ assert.equal(true, typeof a.getConfig === 'function');
1308
+ done();
1309
+ } catch (error) {
1310
+ log.error(`Test Failure: ${error}`);
1311
+ done(error);
1312
+ }
1313
+ });
1314
+ });
1315
+
1316
+ describe('#iapGetDeviceCount', () => {
1317
+ it('should have a iapGetDeviceCount function', (done) => {
1318
+ try {
1319
+ assert.equal(true, typeof a.iapGetDeviceCount === 'function');
1320
+ done();
1321
+ } catch (error) {
1322
+ log.error(`Test Failure: ${error}`);
1323
+ done(error);
1324
+ }
1325
+ });
1326
+ });
1327
+
1328
+ describe('#iapExpandedGenericAdapterRequest', () => {
1329
+ it('should have a iapExpandedGenericAdapterRequest function', (done) => {
1330
+ try {
1331
+ assert.equal(true, typeof a.iapExpandedGenericAdapterRequest === 'function');
1332
+ done();
1333
+ } catch (error) {
1334
+ log.error(`Test Failure: ${error}`);
1335
+ done(error);
1336
+ }
1337
+ });
1338
+ });
1339
+
1340
+ describe('#genericAdapterRequest', () => {
1341
+ it('should have a genericAdapterRequest function', (done) => {
1342
+ try {
1343
+ assert.equal(true, typeof a.genericAdapterRequest === 'function');
1344
+ done();
1345
+ } catch (error) {
1346
+ log.error(`Test Failure: ${error}`);
1347
+ done(error);
1348
+ }
1349
+ });
1350
+ });
1351
+
1352
+ describe('#genericAdapterRequestNoBasePath', () => {
1353
+ it('should have a genericAdapterRequestNoBasePath function', (done) => {
1354
+ try {
1355
+ assert.equal(true, typeof a.genericAdapterRequestNoBasePath === 'function');
1356
+ done();
1357
+ } catch (error) {
1358
+ log.error(`Test Failure: ${error}`);
1359
+ done(error);
1360
+ }
1361
+ });
1362
+ });
1363
+
1364
+ describe('#iapRunAdapterLint', () => {
1365
+ it('should have a iapRunAdapterLint function', (done) => {
1366
+ try {
1367
+ assert.equal(true, typeof a.iapRunAdapterLint === 'function');
1368
+ done();
1369
+ } catch (error) {
1370
+ log.error(`Test Failure: ${error}`);
1371
+ done(error);
1372
+ }
1373
+ });
1374
+ it('retrieve the lint results', (done) => {
1375
+ try {
1376
+ a.iapRunAdapterLint((data, error) => {
1377
+ try {
1378
+ assert.equal(undefined, error);
1379
+ assert.notEqual(undefined, data);
1380
+ assert.notEqual(null, data);
1381
+ assert.notEqual(undefined, data.status);
1382
+ assert.notEqual(null, data.status);
1383
+ assert.equal('SUCCESS', data.status);
1384
+ done();
1385
+ } catch (err) {
1386
+ log.error(`Test Failure: ${err}`);
1387
+ done(err);
1388
+ }
1389
+ });
1390
+ } catch (error) {
1391
+ log.error(`Adapter Exception: ${error}`);
1392
+ done(error);
1393
+ }
1394
+ }).timeout(attemptTimeout);
1395
+ });
1396
+
1397
+ describe('#iapRunAdapterTests', () => {
1398
+ it('should have a iapRunAdapterTests function', (done) => {
1399
+ try {
1400
+ assert.equal(true, typeof a.iapRunAdapterTests === 'function');
1401
+ done();
1402
+ } catch (error) {
1403
+ log.error(`Test Failure: ${error}`);
1404
+ done(error);
1405
+ }
1406
+ });
1407
+ });
1408
+
1409
+ describe('#iapGetAdapterInventory', () => {
1410
+ it('should have a iapGetAdapterInventory function', (done) => {
1411
+ try {
1412
+ assert.equal(true, typeof a.iapGetAdapterInventory === 'function');
1413
+ done();
1414
+ } catch (error) {
1415
+ log.error(`Test Failure: ${error}`);
1416
+ done(error);
1417
+ }
1418
+ });
1419
+ it('retrieve the inventory', (done) => {
1420
+ try {
1421
+ a.iapGetAdapterInventory((data, error) => {
1422
+ try {
1423
+ assert.equal(undefined, error);
1424
+ assert.notEqual(undefined, data);
1425
+ assert.notEqual(null, data);
1426
+ done();
1427
+ } catch (err) {
1428
+ log.error(`Test Failure: ${err}`);
1429
+ done(err);
1430
+ }
1431
+ });
1432
+ } catch (error) {
1433
+ log.error(`Adapter Exception: ${error}`);
1434
+ done(error);
1435
+ }
1436
+ }).timeout(attemptTimeout);
1437
+ });
1438
+ describe('metadata.json', () => {
1439
+ it('should have a metadata.json', (done) => {
1440
+ try {
1441
+ fs.exists('metadata.json', (val) => {
1442
+ assert.equal(true, val);
1443
+ done();
1444
+ });
1445
+ } catch (error) {
1446
+ log.error(`Test Failure: ${error}`);
1447
+ done(error);
1448
+ }
1449
+ });
1450
+ it('metadata.json is customized', (done) => {
1451
+ try {
1452
+ const metadataDotJson = require('../../metadata.json');
1453
+ assert.equal('adapter-aws_cognito_identity_provider', metadataDotJson.name);
1454
+ assert.notEqual(undefined, metadataDotJson.webName);
1455
+ assert.notEqual(null, metadataDotJson.webName);
1456
+ assert.notEqual('', metadataDotJson.webName);
1457
+ assert.equal('Adapter', metadataDotJson.type);
1458
+ done();
1459
+ } catch (error) {
1460
+ log.error(`Test Failure: ${error}`);
1461
+ done(error);
1462
+ }
1463
+ });
1464
+ it('metadata.json contains accurate documentation', (done) => {
1465
+ try {
1466
+ const metadataDotJson = require('../../metadata.json');
1467
+ assert.notEqual(undefined, metadataDotJson.documentation);
1468
+ assert.equal('https://www.npmjs.com/package/@itentialopensource/adapter-aws_cognito_identity_provider', metadataDotJson.documentation.npmLink);
1469
+ assert.equal('https://docs.itential.com/opensource/docs/troubleshooting-an-adapter', metadataDotJson.documentation.faqLink);
1470
+ assert.equal('https://gitlab.com/itentialopensource/adapters/contributing-guide', metadataDotJson.documentation.contributeLink);
1471
+ assert.equal('https://itential.atlassian.net/servicedesk/customer/portals', metadataDotJson.documentation.issueLink);
1472
+ done();
1473
+ } catch (error) {
1474
+ log.error(`Test Failure: ${error}`);
1475
+ done(error);
1476
+ }
1477
+ });
1478
+ it('metadata.json has related items', (done) => {
1479
+ try {
1480
+ const metadataDotJson = require('../../metadata.json');
1481
+ assert.notEqual(undefined, metadataDotJson.relatedItems);
1482
+ assert.notEqual(undefined, metadataDotJson.relatedItems.adapters);
1483
+ assert.notEqual(undefined, metadataDotJson.relatedItems.integrations);
1484
+ assert.notEqual(undefined, metadataDotJson.relatedItems.ecosystemApplications);
1485
+ assert.notEqual(undefined, metadataDotJson.relatedItems.workflowProjects);
1486
+ assert.notEqual(undefined, metadataDotJson.relatedItems.transformationProjects);
1487
+ assert.notEqual(undefined, metadataDotJson.relatedItems.exampleProjects);
1488
+ done();
1489
+ } catch (error) {
1490
+ log.error(`Test Failure: ${error}`);
1491
+ done(error);
1492
+ }
1493
+ });
1494
+ });
1495
+ /*
1496
+ -----------------------------------------------------------------------
1497
+ -----------------------------------------------------------------------
1498
+ *** All code above this comment will be replaced during a migration ***
1499
+ ******************* DO NOT REMOVE THIS COMMENT BLOCK ******************
1500
+ -----------------------------------------------------------------------
1501
+ -----------------------------------------------------------------------
1502
+ */
1503
+
1504
+ describe('#addCustomAttributes - errors', () => {
1505
+ it('should have a addCustomAttributes function', (done) => {
1506
+ try {
1507
+ assert.equal(true, typeof a.addCustomAttributes === 'function');
1508
+ done();
1509
+ } catch (error) {
1510
+ log.error(`Test Failure: ${error}`);
1511
+ done(error);
1512
+ }
1513
+ }).timeout(attemptTimeout);
1514
+ it('should error if - missing body', (done) => {
1515
+ try {
1516
+ a.addCustomAttributes(null, null, (data, error) => {
1517
+ try {
1518
+ const displayE = 'body is required';
1519
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-addCustomAttributes', displayE);
1520
+ done();
1521
+ } catch (err) {
1522
+ log.error(`Test Failure: ${err}`);
1523
+ done(err);
1524
+ }
1525
+ });
1526
+ } catch (error) {
1527
+ log.error(`Adapter Exception: ${error}`);
1528
+ done(error);
1529
+ }
1530
+ }).timeout(attemptTimeout);
1531
+ });
1532
+
1533
+ describe('#adminAddUserToGroup - errors', () => {
1534
+ it('should have a adminAddUserToGroup function', (done) => {
1535
+ try {
1536
+ assert.equal(true, typeof a.adminAddUserToGroup === 'function');
1537
+ done();
1538
+ } catch (error) {
1539
+ log.error(`Test Failure: ${error}`);
1540
+ done(error);
1541
+ }
1542
+ }).timeout(attemptTimeout);
1543
+ it('should error if - missing body', (done) => {
1544
+ try {
1545
+ a.adminAddUserToGroup(null, null, (data, error) => {
1546
+ try {
1547
+ const displayE = 'body is required';
1548
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminAddUserToGroup', displayE);
1549
+ done();
1550
+ } catch (err) {
1551
+ log.error(`Test Failure: ${err}`);
1552
+ done(err);
1553
+ }
1554
+ });
1555
+ } catch (error) {
1556
+ log.error(`Adapter Exception: ${error}`);
1557
+ done(error);
1558
+ }
1559
+ }).timeout(attemptTimeout);
1560
+ });
1561
+
1562
+ describe('#adminConfirmSignUp - errors', () => {
1563
+ it('should have a adminConfirmSignUp function', (done) => {
1564
+ try {
1565
+ assert.equal(true, typeof a.adminConfirmSignUp === 'function');
1566
+ done();
1567
+ } catch (error) {
1568
+ log.error(`Test Failure: ${error}`);
1569
+ done(error);
1570
+ }
1571
+ }).timeout(attemptTimeout);
1572
+ it('should error if - missing body', (done) => {
1573
+ try {
1574
+ a.adminConfirmSignUp(null, null, (data, error) => {
1575
+ try {
1576
+ const displayE = 'body is required';
1577
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminConfirmSignUp', displayE);
1578
+ done();
1579
+ } catch (err) {
1580
+ log.error(`Test Failure: ${err}`);
1581
+ done(err);
1582
+ }
1583
+ });
1584
+ } catch (error) {
1585
+ log.error(`Adapter Exception: ${error}`);
1586
+ done(error);
1587
+ }
1588
+ }).timeout(attemptTimeout);
1589
+ });
1590
+
1591
+ describe('#adminCreateUser - errors', () => {
1592
+ it('should have a adminCreateUser function', (done) => {
1593
+ try {
1594
+ assert.equal(true, typeof a.adminCreateUser === 'function');
1595
+ done();
1596
+ } catch (error) {
1597
+ log.error(`Test Failure: ${error}`);
1598
+ done(error);
1599
+ }
1600
+ }).timeout(attemptTimeout);
1601
+ it('should error if - missing body', (done) => {
1602
+ try {
1603
+ a.adminCreateUser(null, null, (data, error) => {
1604
+ try {
1605
+ const displayE = 'body is required';
1606
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminCreateUser', displayE);
1607
+ done();
1608
+ } catch (err) {
1609
+ log.error(`Test Failure: ${err}`);
1610
+ done(err);
1611
+ }
1612
+ });
1613
+ } catch (error) {
1614
+ log.error(`Adapter Exception: ${error}`);
1615
+ done(error);
1616
+ }
1617
+ }).timeout(attemptTimeout);
1618
+ });
1619
+
1620
+ describe('#adminDeleteUser - errors', () => {
1621
+ it('should have a adminDeleteUser function', (done) => {
1622
+ try {
1623
+ assert.equal(true, typeof a.adminDeleteUser === 'function');
1624
+ done();
1625
+ } catch (error) {
1626
+ log.error(`Test Failure: ${error}`);
1627
+ done(error);
1628
+ }
1629
+ }).timeout(attemptTimeout);
1630
+ it('should error if - missing body', (done) => {
1631
+ try {
1632
+ a.adminDeleteUser(null, null, (data, error) => {
1633
+ try {
1634
+ const displayE = 'body is required';
1635
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminDeleteUser', displayE);
1636
+ done();
1637
+ } catch (err) {
1638
+ log.error(`Test Failure: ${err}`);
1639
+ done(err);
1640
+ }
1641
+ });
1642
+ } catch (error) {
1643
+ log.error(`Adapter Exception: ${error}`);
1644
+ done(error);
1645
+ }
1646
+ }).timeout(attemptTimeout);
1647
+ });
1648
+
1649
+ describe('#adminDeleteUserAttributes - errors', () => {
1650
+ it('should have a adminDeleteUserAttributes function', (done) => {
1651
+ try {
1652
+ assert.equal(true, typeof a.adminDeleteUserAttributes === 'function');
1653
+ done();
1654
+ } catch (error) {
1655
+ log.error(`Test Failure: ${error}`);
1656
+ done(error);
1657
+ }
1658
+ }).timeout(attemptTimeout);
1659
+ it('should error if - missing body', (done) => {
1660
+ try {
1661
+ a.adminDeleteUserAttributes(null, null, (data, error) => {
1662
+ try {
1663
+ const displayE = 'body is required';
1664
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminDeleteUserAttributes', displayE);
1665
+ done();
1666
+ } catch (err) {
1667
+ log.error(`Test Failure: ${err}`);
1668
+ done(err);
1669
+ }
1670
+ });
1671
+ } catch (error) {
1672
+ log.error(`Adapter Exception: ${error}`);
1673
+ done(error);
1674
+ }
1675
+ }).timeout(attemptTimeout);
1676
+ });
1677
+
1678
+ describe('#adminDisableProviderForUser - errors', () => {
1679
+ it('should have a adminDisableProviderForUser function', (done) => {
1680
+ try {
1681
+ assert.equal(true, typeof a.adminDisableProviderForUser === 'function');
1682
+ done();
1683
+ } catch (error) {
1684
+ log.error(`Test Failure: ${error}`);
1685
+ done(error);
1686
+ }
1687
+ }).timeout(attemptTimeout);
1688
+ it('should error if - missing body', (done) => {
1689
+ try {
1690
+ a.adminDisableProviderForUser(null, null, (data, error) => {
1691
+ try {
1692
+ const displayE = 'body is required';
1693
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminDisableProviderForUser', displayE);
1694
+ done();
1695
+ } catch (err) {
1696
+ log.error(`Test Failure: ${err}`);
1697
+ done(err);
1698
+ }
1699
+ });
1700
+ } catch (error) {
1701
+ log.error(`Adapter Exception: ${error}`);
1702
+ done(error);
1703
+ }
1704
+ }).timeout(attemptTimeout);
1705
+ });
1706
+
1707
+ describe('#adminDisableUser - errors', () => {
1708
+ it('should have a adminDisableUser function', (done) => {
1709
+ try {
1710
+ assert.equal(true, typeof a.adminDisableUser === 'function');
1711
+ done();
1712
+ } catch (error) {
1713
+ log.error(`Test Failure: ${error}`);
1714
+ done(error);
1715
+ }
1716
+ }).timeout(attemptTimeout);
1717
+ it('should error if - missing body', (done) => {
1718
+ try {
1719
+ a.adminDisableUser(null, null, (data, error) => {
1720
+ try {
1721
+ const displayE = 'body is required';
1722
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminDisableUser', displayE);
1723
+ done();
1724
+ } catch (err) {
1725
+ log.error(`Test Failure: ${err}`);
1726
+ done(err);
1727
+ }
1728
+ });
1729
+ } catch (error) {
1730
+ log.error(`Adapter Exception: ${error}`);
1731
+ done(error);
1732
+ }
1733
+ }).timeout(attemptTimeout);
1734
+ });
1735
+
1736
+ describe('#adminEnableUser - errors', () => {
1737
+ it('should have a adminEnableUser function', (done) => {
1738
+ try {
1739
+ assert.equal(true, typeof a.adminEnableUser === 'function');
1740
+ done();
1741
+ } catch (error) {
1742
+ log.error(`Test Failure: ${error}`);
1743
+ done(error);
1744
+ }
1745
+ }).timeout(attemptTimeout);
1746
+ it('should error if - missing body', (done) => {
1747
+ try {
1748
+ a.adminEnableUser(null, null, (data, error) => {
1749
+ try {
1750
+ const displayE = 'body is required';
1751
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminEnableUser', displayE);
1752
+ done();
1753
+ } catch (err) {
1754
+ log.error(`Test Failure: ${err}`);
1755
+ done(err);
1756
+ }
1757
+ });
1758
+ } catch (error) {
1759
+ log.error(`Adapter Exception: ${error}`);
1760
+ done(error);
1761
+ }
1762
+ }).timeout(attemptTimeout);
1763
+ });
1764
+
1765
+ describe('#adminForgetDevice - errors', () => {
1766
+ it('should have a adminForgetDevice function', (done) => {
1767
+ try {
1768
+ assert.equal(true, typeof a.adminForgetDevice === 'function');
1769
+ done();
1770
+ } catch (error) {
1771
+ log.error(`Test Failure: ${error}`);
1772
+ done(error);
1773
+ }
1774
+ }).timeout(attemptTimeout);
1775
+ it('should error if - missing body', (done) => {
1776
+ try {
1777
+ a.adminForgetDevice(null, null, (data, error) => {
1778
+ try {
1779
+ const displayE = 'body is required';
1780
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminForgetDevice', displayE);
1781
+ done();
1782
+ } catch (err) {
1783
+ log.error(`Test Failure: ${err}`);
1784
+ done(err);
1785
+ }
1786
+ });
1787
+ } catch (error) {
1788
+ log.error(`Adapter Exception: ${error}`);
1789
+ done(error);
1790
+ }
1791
+ }).timeout(attemptTimeout);
1792
+ });
1793
+
1794
+ describe('#adminGetDevice - errors', () => {
1795
+ it('should have a adminGetDevice function', (done) => {
1796
+ try {
1797
+ assert.equal(true, typeof a.adminGetDevice === 'function');
1798
+ done();
1799
+ } catch (error) {
1800
+ log.error(`Test Failure: ${error}`);
1801
+ done(error);
1802
+ }
1803
+ }).timeout(attemptTimeout);
1804
+ it('should error if - missing body', (done) => {
1805
+ try {
1806
+ a.adminGetDevice(null, null, (data, error) => {
1807
+ try {
1808
+ const displayE = 'body is required';
1809
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminGetDevice', displayE);
1810
+ done();
1811
+ } catch (err) {
1812
+ log.error(`Test Failure: ${err}`);
1813
+ done(err);
1814
+ }
1815
+ });
1816
+ } catch (error) {
1817
+ log.error(`Adapter Exception: ${error}`);
1818
+ done(error);
1819
+ }
1820
+ }).timeout(attemptTimeout);
1821
+ });
1822
+
1823
+ describe('#adminGetUser - errors', () => {
1824
+ it('should have a adminGetUser function', (done) => {
1825
+ try {
1826
+ assert.equal(true, typeof a.adminGetUser === 'function');
1827
+ done();
1828
+ } catch (error) {
1829
+ log.error(`Test Failure: ${error}`);
1830
+ done(error);
1831
+ }
1832
+ }).timeout(attemptTimeout);
1833
+ it('should error if - missing body', (done) => {
1834
+ try {
1835
+ a.adminGetUser(null, null, (data, error) => {
1836
+ try {
1837
+ const displayE = 'body is required';
1838
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminGetUser', displayE);
1839
+ done();
1840
+ } catch (err) {
1841
+ log.error(`Test Failure: ${err}`);
1842
+ done(err);
1843
+ }
1844
+ });
1845
+ } catch (error) {
1846
+ log.error(`Adapter Exception: ${error}`);
1847
+ done(error);
1848
+ }
1849
+ }).timeout(attemptTimeout);
1850
+ });
1851
+
1852
+ describe('#adminInitiateAuth - errors', () => {
1853
+ it('should have a adminInitiateAuth function', (done) => {
1854
+ try {
1855
+ assert.equal(true, typeof a.adminInitiateAuth === 'function');
1856
+ done();
1857
+ } catch (error) {
1858
+ log.error(`Test Failure: ${error}`);
1859
+ done(error);
1860
+ }
1861
+ }).timeout(attemptTimeout);
1862
+ it('should error if - missing body', (done) => {
1863
+ try {
1864
+ a.adminInitiateAuth(null, null, (data, error) => {
1865
+ try {
1866
+ const displayE = 'body is required';
1867
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminInitiateAuth', displayE);
1868
+ done();
1869
+ } catch (err) {
1870
+ log.error(`Test Failure: ${err}`);
1871
+ done(err);
1872
+ }
1873
+ });
1874
+ } catch (error) {
1875
+ log.error(`Adapter Exception: ${error}`);
1876
+ done(error);
1877
+ }
1878
+ }).timeout(attemptTimeout);
1879
+ });
1880
+
1881
+ describe('#adminLinkProviderForUser - errors', () => {
1882
+ it('should have a adminLinkProviderForUser function', (done) => {
1883
+ try {
1884
+ assert.equal(true, typeof a.adminLinkProviderForUser === 'function');
1885
+ done();
1886
+ } catch (error) {
1887
+ log.error(`Test Failure: ${error}`);
1888
+ done(error);
1889
+ }
1890
+ }).timeout(attemptTimeout);
1891
+ it('should error if - missing body', (done) => {
1892
+ try {
1893
+ a.adminLinkProviderForUser(null, null, (data, error) => {
1894
+ try {
1895
+ const displayE = 'body is required';
1896
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminLinkProviderForUser', displayE);
1897
+ done();
1898
+ } catch (err) {
1899
+ log.error(`Test Failure: ${err}`);
1900
+ done(err);
1901
+ }
1902
+ });
1903
+ } catch (error) {
1904
+ log.error(`Adapter Exception: ${error}`);
1905
+ done(error);
1906
+ }
1907
+ }).timeout(attemptTimeout);
1908
+ });
1909
+
1910
+ describe('#adminListDevices - errors', () => {
1911
+ it('should have a adminListDevices function', (done) => {
1912
+ try {
1913
+ assert.equal(true, typeof a.adminListDevices === 'function');
1914
+ done();
1915
+ } catch (error) {
1916
+ log.error(`Test Failure: ${error}`);
1917
+ done(error);
1918
+ }
1919
+ }).timeout(attemptTimeout);
1920
+ it('should error if - missing body', (done) => {
1921
+ try {
1922
+ a.adminListDevices(null, null, (data, error) => {
1923
+ try {
1924
+ const displayE = 'body is required';
1925
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminListDevices', displayE);
1926
+ done();
1927
+ } catch (err) {
1928
+ log.error(`Test Failure: ${err}`);
1929
+ done(err);
1930
+ }
1931
+ });
1932
+ } catch (error) {
1933
+ log.error(`Adapter Exception: ${error}`);
1934
+ done(error);
1935
+ }
1936
+ }).timeout(attemptTimeout);
1937
+ });
1938
+
1939
+ describe('#adminListGroupsForUser - errors', () => {
1940
+ it('should have a adminListGroupsForUser function', (done) => {
1941
+ try {
1942
+ assert.equal(true, typeof a.adminListGroupsForUser === 'function');
1943
+ done();
1944
+ } catch (error) {
1945
+ log.error(`Test Failure: ${error}`);
1946
+ done(error);
1947
+ }
1948
+ }).timeout(attemptTimeout);
1949
+ it('should error if - missing body', (done) => {
1950
+ try {
1951
+ a.adminListGroupsForUser('fakeparam', 'fakeparam', null, null, (data, error) => {
1952
+ try {
1953
+ const displayE = 'body is required';
1954
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminListGroupsForUser', displayE);
1955
+ done();
1956
+ } catch (err) {
1957
+ log.error(`Test Failure: ${err}`);
1958
+ done(err);
1959
+ }
1960
+ });
1961
+ } catch (error) {
1962
+ log.error(`Adapter Exception: ${error}`);
1963
+ done(error);
1964
+ }
1965
+ }).timeout(attemptTimeout);
1966
+ });
1967
+
1968
+ describe('#adminListUserAuthEvents - errors', () => {
1969
+ it('should have a adminListUserAuthEvents function', (done) => {
1970
+ try {
1971
+ assert.equal(true, typeof a.adminListUserAuthEvents === 'function');
1972
+ done();
1973
+ } catch (error) {
1974
+ log.error(`Test Failure: ${error}`);
1975
+ done(error);
1976
+ }
1977
+ }).timeout(attemptTimeout);
1978
+ it('should error if - missing body', (done) => {
1979
+ try {
1980
+ a.adminListUserAuthEvents('fakeparam', 'fakeparam', null, null, (data, error) => {
1981
+ try {
1982
+ const displayE = 'body is required';
1983
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminListUserAuthEvents', displayE);
1984
+ done();
1985
+ } catch (err) {
1986
+ log.error(`Test Failure: ${err}`);
1987
+ done(err);
1988
+ }
1989
+ });
1990
+ } catch (error) {
1991
+ log.error(`Adapter Exception: ${error}`);
1992
+ done(error);
1993
+ }
1994
+ }).timeout(attemptTimeout);
1995
+ });
1996
+
1997
+ describe('#adminRemoveUserFromGroup - errors', () => {
1998
+ it('should have a adminRemoveUserFromGroup function', (done) => {
1999
+ try {
2000
+ assert.equal(true, typeof a.adminRemoveUserFromGroup === 'function');
2001
+ done();
2002
+ } catch (error) {
2003
+ log.error(`Test Failure: ${error}`);
2004
+ done(error);
2005
+ }
2006
+ }).timeout(attemptTimeout);
2007
+ it('should error if - missing body', (done) => {
2008
+ try {
2009
+ a.adminRemoveUserFromGroup(null, null, (data, error) => {
2010
+ try {
2011
+ const displayE = 'body is required';
2012
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminRemoveUserFromGroup', displayE);
2013
+ done();
2014
+ } catch (err) {
2015
+ log.error(`Test Failure: ${err}`);
2016
+ done(err);
2017
+ }
2018
+ });
2019
+ } catch (error) {
2020
+ log.error(`Adapter Exception: ${error}`);
2021
+ done(error);
2022
+ }
2023
+ }).timeout(attemptTimeout);
2024
+ });
2025
+
2026
+ describe('#adminResetUserPassword - errors', () => {
2027
+ it('should have a adminResetUserPassword function', (done) => {
2028
+ try {
2029
+ assert.equal(true, typeof a.adminResetUserPassword === 'function');
2030
+ done();
2031
+ } catch (error) {
2032
+ log.error(`Test Failure: ${error}`);
2033
+ done(error);
2034
+ }
2035
+ }).timeout(attemptTimeout);
2036
+ it('should error if - missing body', (done) => {
2037
+ try {
2038
+ a.adminResetUserPassword(null, null, (data, error) => {
2039
+ try {
2040
+ const displayE = 'body is required';
2041
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminResetUserPassword', displayE);
2042
+ done();
2043
+ } catch (err) {
2044
+ log.error(`Test Failure: ${err}`);
2045
+ done(err);
2046
+ }
2047
+ });
2048
+ } catch (error) {
2049
+ log.error(`Adapter Exception: ${error}`);
2050
+ done(error);
2051
+ }
2052
+ }).timeout(attemptTimeout);
2053
+ });
2054
+
2055
+ describe('#adminRespondToAuthChallenge - errors', () => {
2056
+ it('should have a adminRespondToAuthChallenge function', (done) => {
2057
+ try {
2058
+ assert.equal(true, typeof a.adminRespondToAuthChallenge === 'function');
2059
+ done();
2060
+ } catch (error) {
2061
+ log.error(`Test Failure: ${error}`);
2062
+ done(error);
2063
+ }
2064
+ }).timeout(attemptTimeout);
2065
+ it('should error if - missing body', (done) => {
2066
+ try {
2067
+ a.adminRespondToAuthChallenge(null, null, (data, error) => {
2068
+ try {
2069
+ const displayE = 'body is required';
2070
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminRespondToAuthChallenge', displayE);
2071
+ done();
2072
+ } catch (err) {
2073
+ log.error(`Test Failure: ${err}`);
2074
+ done(err);
2075
+ }
2076
+ });
2077
+ } catch (error) {
2078
+ log.error(`Adapter Exception: ${error}`);
2079
+ done(error);
2080
+ }
2081
+ }).timeout(attemptTimeout);
2082
+ });
2083
+
2084
+ describe('#adminSetUserMFAPreference - errors', () => {
2085
+ it('should have a adminSetUserMFAPreference function', (done) => {
2086
+ try {
2087
+ assert.equal(true, typeof a.adminSetUserMFAPreference === 'function');
2088
+ done();
2089
+ } catch (error) {
2090
+ log.error(`Test Failure: ${error}`);
2091
+ done(error);
2092
+ }
2093
+ }).timeout(attemptTimeout);
2094
+ it('should error if - missing body', (done) => {
2095
+ try {
2096
+ a.adminSetUserMFAPreference(null, null, (data, error) => {
2097
+ try {
2098
+ const displayE = 'body is required';
2099
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminSetUserMFAPreference', displayE);
2100
+ done();
2101
+ } catch (err) {
2102
+ log.error(`Test Failure: ${err}`);
2103
+ done(err);
2104
+ }
2105
+ });
2106
+ } catch (error) {
2107
+ log.error(`Adapter Exception: ${error}`);
2108
+ done(error);
2109
+ }
2110
+ }).timeout(attemptTimeout);
2111
+ });
2112
+
2113
+ describe('#adminSetUserPassword - errors', () => {
2114
+ it('should have a adminSetUserPassword function', (done) => {
2115
+ try {
2116
+ assert.equal(true, typeof a.adminSetUserPassword === 'function');
2117
+ done();
2118
+ } catch (error) {
2119
+ log.error(`Test Failure: ${error}`);
2120
+ done(error);
2121
+ }
2122
+ }).timeout(attemptTimeout);
2123
+ it('should error if - missing body', (done) => {
2124
+ try {
2125
+ a.adminSetUserPassword(null, null, (data, error) => {
2126
+ try {
2127
+ const displayE = 'body is required';
2128
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminSetUserPassword', displayE);
2129
+ done();
2130
+ } catch (err) {
2131
+ log.error(`Test Failure: ${err}`);
2132
+ done(err);
2133
+ }
2134
+ });
2135
+ } catch (error) {
2136
+ log.error(`Adapter Exception: ${error}`);
2137
+ done(error);
2138
+ }
2139
+ }).timeout(attemptTimeout);
2140
+ });
2141
+
2142
+ describe('#adminSetUserSettings - errors', () => {
2143
+ it('should have a adminSetUserSettings function', (done) => {
2144
+ try {
2145
+ assert.equal(true, typeof a.adminSetUserSettings === 'function');
2146
+ done();
2147
+ } catch (error) {
2148
+ log.error(`Test Failure: ${error}`);
2149
+ done(error);
2150
+ }
2151
+ }).timeout(attemptTimeout);
2152
+ it('should error if - missing body', (done) => {
2153
+ try {
2154
+ a.adminSetUserSettings(null, null, (data, error) => {
2155
+ try {
2156
+ const displayE = 'body is required';
2157
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminSetUserSettings', displayE);
2158
+ done();
2159
+ } catch (err) {
2160
+ log.error(`Test Failure: ${err}`);
2161
+ done(err);
2162
+ }
2163
+ });
2164
+ } catch (error) {
2165
+ log.error(`Adapter Exception: ${error}`);
2166
+ done(error);
2167
+ }
2168
+ }).timeout(attemptTimeout);
2169
+ });
2170
+
2171
+ describe('#adminUpdateAuthEventFeedback - errors', () => {
2172
+ it('should have a adminUpdateAuthEventFeedback function', (done) => {
2173
+ try {
2174
+ assert.equal(true, typeof a.adminUpdateAuthEventFeedback === 'function');
2175
+ done();
2176
+ } catch (error) {
2177
+ log.error(`Test Failure: ${error}`);
2178
+ done(error);
2179
+ }
2180
+ }).timeout(attemptTimeout);
2181
+ it('should error if - missing body', (done) => {
2182
+ try {
2183
+ a.adminUpdateAuthEventFeedback(null, null, (data, error) => {
2184
+ try {
2185
+ const displayE = 'body is required';
2186
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminUpdateAuthEventFeedback', displayE);
2187
+ done();
2188
+ } catch (err) {
2189
+ log.error(`Test Failure: ${err}`);
2190
+ done(err);
2191
+ }
2192
+ });
2193
+ } catch (error) {
2194
+ log.error(`Adapter Exception: ${error}`);
2195
+ done(error);
2196
+ }
2197
+ }).timeout(attemptTimeout);
2198
+ });
2199
+
2200
+ describe('#adminUpdateDeviceStatus - errors', () => {
2201
+ it('should have a adminUpdateDeviceStatus function', (done) => {
2202
+ try {
2203
+ assert.equal(true, typeof a.adminUpdateDeviceStatus === 'function');
2204
+ done();
2205
+ } catch (error) {
2206
+ log.error(`Test Failure: ${error}`);
2207
+ done(error);
2208
+ }
2209
+ }).timeout(attemptTimeout);
2210
+ it('should error if - missing body', (done) => {
2211
+ try {
2212
+ a.adminUpdateDeviceStatus(null, null, (data, error) => {
2213
+ try {
2214
+ const displayE = 'body is required';
2215
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminUpdateDeviceStatus', displayE);
2216
+ done();
2217
+ } catch (err) {
2218
+ log.error(`Test Failure: ${err}`);
2219
+ done(err);
2220
+ }
2221
+ });
2222
+ } catch (error) {
2223
+ log.error(`Adapter Exception: ${error}`);
2224
+ done(error);
2225
+ }
2226
+ }).timeout(attemptTimeout);
2227
+ });
2228
+
2229
+ describe('#adminUpdateUserAttributes - errors', () => {
2230
+ it('should have a adminUpdateUserAttributes function', (done) => {
2231
+ try {
2232
+ assert.equal(true, typeof a.adminUpdateUserAttributes === 'function');
2233
+ done();
2234
+ } catch (error) {
2235
+ log.error(`Test Failure: ${error}`);
2236
+ done(error);
2237
+ }
2238
+ }).timeout(attemptTimeout);
2239
+ it('should error if - missing body', (done) => {
2240
+ try {
2241
+ a.adminUpdateUserAttributes(null, null, (data, error) => {
2242
+ try {
2243
+ const displayE = 'body is required';
2244
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminUpdateUserAttributes', displayE);
2245
+ done();
2246
+ } catch (err) {
2247
+ log.error(`Test Failure: ${err}`);
2248
+ done(err);
2249
+ }
2250
+ });
2251
+ } catch (error) {
2252
+ log.error(`Adapter Exception: ${error}`);
2253
+ done(error);
2254
+ }
2255
+ }).timeout(attemptTimeout);
2256
+ });
2257
+
2258
+ describe('#adminUserGlobalSignOut - errors', () => {
2259
+ it('should have a adminUserGlobalSignOut function', (done) => {
2260
+ try {
2261
+ assert.equal(true, typeof a.adminUserGlobalSignOut === 'function');
2262
+ done();
2263
+ } catch (error) {
2264
+ log.error(`Test Failure: ${error}`);
2265
+ done(error);
2266
+ }
2267
+ }).timeout(attemptTimeout);
2268
+ it('should error if - missing body', (done) => {
2269
+ try {
2270
+ a.adminUserGlobalSignOut(null, null, (data, error) => {
2271
+ try {
2272
+ const displayE = 'body is required';
2273
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-adminUserGlobalSignOut', displayE);
2274
+ done();
2275
+ } catch (err) {
2276
+ log.error(`Test Failure: ${err}`);
2277
+ done(err);
2278
+ }
2279
+ });
2280
+ } catch (error) {
2281
+ log.error(`Adapter Exception: ${error}`);
2282
+ done(error);
2283
+ }
2284
+ }).timeout(attemptTimeout);
2285
+ });
2286
+
2287
+ describe('#associateSoftwareToken - errors', () => {
2288
+ it('should have a associateSoftwareToken function', (done) => {
2289
+ try {
2290
+ assert.equal(true, typeof a.associateSoftwareToken === 'function');
2291
+ done();
2292
+ } catch (error) {
2293
+ log.error(`Test Failure: ${error}`);
2294
+ done(error);
2295
+ }
2296
+ }).timeout(attemptTimeout);
2297
+ it('should error if - missing body', (done) => {
2298
+ try {
2299
+ a.associateSoftwareToken(null, null, (data, error) => {
2300
+ try {
2301
+ const displayE = 'body is required';
2302
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-associateSoftwareToken', displayE);
2303
+ done();
2304
+ } catch (err) {
2305
+ log.error(`Test Failure: ${err}`);
2306
+ done(err);
2307
+ }
2308
+ });
2309
+ } catch (error) {
2310
+ log.error(`Adapter Exception: ${error}`);
2311
+ done(error);
2312
+ }
2313
+ }).timeout(attemptTimeout);
2314
+ });
2315
+
2316
+ describe('#changePassword - errors', () => {
2317
+ it('should have a changePassword function', (done) => {
2318
+ try {
2319
+ assert.equal(true, typeof a.changePassword === 'function');
2320
+ done();
2321
+ } catch (error) {
2322
+ log.error(`Test Failure: ${error}`);
2323
+ done(error);
2324
+ }
2325
+ }).timeout(attemptTimeout);
2326
+ it('should error if - missing body', (done) => {
2327
+ try {
2328
+ a.changePassword(null, null, (data, error) => {
2329
+ try {
2330
+ const displayE = 'body is required';
2331
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-changePassword', displayE);
2332
+ done();
2333
+ } catch (err) {
2334
+ log.error(`Test Failure: ${err}`);
2335
+ done(err);
2336
+ }
2337
+ });
2338
+ } catch (error) {
2339
+ log.error(`Adapter Exception: ${error}`);
2340
+ done(error);
2341
+ }
2342
+ }).timeout(attemptTimeout);
2343
+ });
2344
+
2345
+ describe('#confirmDevice - errors', () => {
2346
+ it('should have a confirmDevice function', (done) => {
2347
+ try {
2348
+ assert.equal(true, typeof a.confirmDevice === 'function');
2349
+ done();
2350
+ } catch (error) {
2351
+ log.error(`Test Failure: ${error}`);
2352
+ done(error);
2353
+ }
2354
+ }).timeout(attemptTimeout);
2355
+ it('should error if - missing body', (done) => {
2356
+ try {
2357
+ a.confirmDevice(null, null, (data, error) => {
2358
+ try {
2359
+ const displayE = 'body is required';
2360
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-confirmDevice', displayE);
2361
+ done();
2362
+ } catch (err) {
2363
+ log.error(`Test Failure: ${err}`);
2364
+ done(err);
2365
+ }
2366
+ });
2367
+ } catch (error) {
2368
+ log.error(`Adapter Exception: ${error}`);
2369
+ done(error);
2370
+ }
2371
+ }).timeout(attemptTimeout);
2372
+ });
2373
+
2374
+ describe('#confirmForgotPassword - errors', () => {
2375
+ it('should have a confirmForgotPassword function', (done) => {
2376
+ try {
2377
+ assert.equal(true, typeof a.confirmForgotPassword === 'function');
2378
+ done();
2379
+ } catch (error) {
2380
+ log.error(`Test Failure: ${error}`);
2381
+ done(error);
2382
+ }
2383
+ }).timeout(attemptTimeout);
2384
+ it('should error if - missing body', (done) => {
2385
+ try {
2386
+ a.confirmForgotPassword(null, null, (data, error) => {
2387
+ try {
2388
+ const displayE = 'body is required';
2389
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-confirmForgotPassword', displayE);
2390
+ done();
2391
+ } catch (err) {
2392
+ log.error(`Test Failure: ${err}`);
2393
+ done(err);
2394
+ }
2395
+ });
2396
+ } catch (error) {
2397
+ log.error(`Adapter Exception: ${error}`);
2398
+ done(error);
2399
+ }
2400
+ }).timeout(attemptTimeout);
2401
+ });
2402
+
2403
+ describe('#confirmSignUp - errors', () => {
2404
+ it('should have a confirmSignUp function', (done) => {
2405
+ try {
2406
+ assert.equal(true, typeof a.confirmSignUp === 'function');
2407
+ done();
2408
+ } catch (error) {
2409
+ log.error(`Test Failure: ${error}`);
2410
+ done(error);
2411
+ }
2412
+ }).timeout(attemptTimeout);
2413
+ it('should error if - missing body', (done) => {
2414
+ try {
2415
+ a.confirmSignUp(null, null, (data, error) => {
2416
+ try {
2417
+ const displayE = 'body is required';
2418
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-confirmSignUp', displayE);
2419
+ done();
2420
+ } catch (err) {
2421
+ log.error(`Test Failure: ${err}`);
2422
+ done(err);
2423
+ }
2424
+ });
2425
+ } catch (error) {
2426
+ log.error(`Adapter Exception: ${error}`);
2427
+ done(error);
2428
+ }
2429
+ }).timeout(attemptTimeout);
2430
+ });
2431
+
2432
+ describe('#createGroup - errors', () => {
2433
+ it('should have a createGroup function', (done) => {
2434
+ try {
2435
+ assert.equal(true, typeof a.createGroup === 'function');
2436
+ done();
2437
+ } catch (error) {
2438
+ log.error(`Test Failure: ${error}`);
2439
+ done(error);
2440
+ }
2441
+ }).timeout(attemptTimeout);
2442
+ it('should error if - missing body', (done) => {
2443
+ try {
2444
+ a.createGroup(null, null, (data, error) => {
2445
+ try {
2446
+ const displayE = 'body is required';
2447
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-createGroup', displayE);
2448
+ done();
2449
+ } catch (err) {
2450
+ log.error(`Test Failure: ${err}`);
2451
+ done(err);
2452
+ }
2453
+ });
2454
+ } catch (error) {
2455
+ log.error(`Adapter Exception: ${error}`);
2456
+ done(error);
2457
+ }
2458
+ }).timeout(attemptTimeout);
2459
+ });
2460
+
2461
+ describe('#createIdentityProvider - errors', () => {
2462
+ it('should have a createIdentityProvider function', (done) => {
2463
+ try {
2464
+ assert.equal(true, typeof a.createIdentityProvider === 'function');
2465
+ done();
2466
+ } catch (error) {
2467
+ log.error(`Test Failure: ${error}`);
2468
+ done(error);
2469
+ }
2470
+ }).timeout(attemptTimeout);
2471
+ it('should error if - missing body', (done) => {
2472
+ try {
2473
+ a.createIdentityProvider(null, null, (data, error) => {
2474
+ try {
2475
+ const displayE = 'body is required';
2476
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-createIdentityProvider', displayE);
2477
+ done();
2478
+ } catch (err) {
2479
+ log.error(`Test Failure: ${err}`);
2480
+ done(err);
2481
+ }
2482
+ });
2483
+ } catch (error) {
2484
+ log.error(`Adapter Exception: ${error}`);
2485
+ done(error);
2486
+ }
2487
+ }).timeout(attemptTimeout);
2488
+ });
2489
+
2490
+ describe('#createResourceServer - errors', () => {
2491
+ it('should have a createResourceServer function', (done) => {
2492
+ try {
2493
+ assert.equal(true, typeof a.createResourceServer === 'function');
2494
+ done();
2495
+ } catch (error) {
2496
+ log.error(`Test Failure: ${error}`);
2497
+ done(error);
2498
+ }
2499
+ }).timeout(attemptTimeout);
2500
+ it('should error if - missing body', (done) => {
2501
+ try {
2502
+ a.createResourceServer(null, null, (data, error) => {
2503
+ try {
2504
+ const displayE = 'body is required';
2505
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-createResourceServer', displayE);
2506
+ done();
2507
+ } catch (err) {
2508
+ log.error(`Test Failure: ${err}`);
2509
+ done(err);
2510
+ }
2511
+ });
2512
+ } catch (error) {
2513
+ log.error(`Adapter Exception: ${error}`);
2514
+ done(error);
2515
+ }
2516
+ }).timeout(attemptTimeout);
2517
+ });
2518
+
2519
+ describe('#createUserImportJob - errors', () => {
2520
+ it('should have a createUserImportJob function', (done) => {
2521
+ try {
2522
+ assert.equal(true, typeof a.createUserImportJob === 'function');
2523
+ done();
2524
+ } catch (error) {
2525
+ log.error(`Test Failure: ${error}`);
2526
+ done(error);
2527
+ }
2528
+ }).timeout(attemptTimeout);
2529
+ it('should error if - missing body', (done) => {
2530
+ try {
2531
+ a.createUserImportJob(null, null, (data, error) => {
2532
+ try {
2533
+ const displayE = 'body is required';
2534
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-createUserImportJob', displayE);
2535
+ done();
2536
+ } catch (err) {
2537
+ log.error(`Test Failure: ${err}`);
2538
+ done(err);
2539
+ }
2540
+ });
2541
+ } catch (error) {
2542
+ log.error(`Adapter Exception: ${error}`);
2543
+ done(error);
2544
+ }
2545
+ }).timeout(attemptTimeout);
2546
+ });
2547
+
2548
+ describe('#createUserPool - errors', () => {
2549
+ it('should have a createUserPool function', (done) => {
2550
+ try {
2551
+ assert.equal(true, typeof a.createUserPool === 'function');
2552
+ done();
2553
+ } catch (error) {
2554
+ log.error(`Test Failure: ${error}`);
2555
+ done(error);
2556
+ }
2557
+ }).timeout(attemptTimeout);
2558
+ it('should error if - missing body', (done) => {
2559
+ try {
2560
+ a.createUserPool(null, null, (data, error) => {
2561
+ try {
2562
+ const displayE = 'body is required';
2563
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-createUserPool', displayE);
2564
+ done();
2565
+ } catch (err) {
2566
+ log.error(`Test Failure: ${err}`);
2567
+ done(err);
2568
+ }
2569
+ });
2570
+ } catch (error) {
2571
+ log.error(`Adapter Exception: ${error}`);
2572
+ done(error);
2573
+ }
2574
+ }).timeout(attemptTimeout);
2575
+ });
2576
+
2577
+ describe('#createUserPoolClient - errors', () => {
2578
+ it('should have a createUserPoolClient function', (done) => {
2579
+ try {
2580
+ assert.equal(true, typeof a.createUserPoolClient === 'function');
2581
+ done();
2582
+ } catch (error) {
2583
+ log.error(`Test Failure: ${error}`);
2584
+ done(error);
2585
+ }
2586
+ }).timeout(attemptTimeout);
2587
+ it('should error if - missing body', (done) => {
2588
+ try {
2589
+ a.createUserPoolClient(null, null, (data, error) => {
2590
+ try {
2591
+ const displayE = 'body is required';
2592
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-createUserPoolClient', displayE);
2593
+ done();
2594
+ } catch (err) {
2595
+ log.error(`Test Failure: ${err}`);
2596
+ done(err);
2597
+ }
2598
+ });
2599
+ } catch (error) {
2600
+ log.error(`Adapter Exception: ${error}`);
2601
+ done(error);
2602
+ }
2603
+ }).timeout(attemptTimeout);
2604
+ });
2605
+
2606
+ describe('#createUserPoolDomain - errors', () => {
2607
+ it('should have a createUserPoolDomain function', (done) => {
2608
+ try {
2609
+ assert.equal(true, typeof a.createUserPoolDomain === 'function');
2610
+ done();
2611
+ } catch (error) {
2612
+ log.error(`Test Failure: ${error}`);
2613
+ done(error);
2614
+ }
2615
+ }).timeout(attemptTimeout);
2616
+ it('should error if - missing body', (done) => {
2617
+ try {
2618
+ a.createUserPoolDomain(null, null, (data, error) => {
2619
+ try {
2620
+ const displayE = 'body is required';
2621
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-createUserPoolDomain', displayE);
2622
+ done();
2623
+ } catch (err) {
2624
+ log.error(`Test Failure: ${err}`);
2625
+ done(err);
2626
+ }
2627
+ });
2628
+ } catch (error) {
2629
+ log.error(`Adapter Exception: ${error}`);
2630
+ done(error);
2631
+ }
2632
+ }).timeout(attemptTimeout);
2633
+ });
2634
+
2635
+ describe('#deleteGroup - errors', () => {
2636
+ it('should have a deleteGroup function', (done) => {
2637
+ try {
2638
+ assert.equal(true, typeof a.deleteGroup === 'function');
2639
+ done();
2640
+ } catch (error) {
2641
+ log.error(`Test Failure: ${error}`);
2642
+ done(error);
2643
+ }
2644
+ }).timeout(attemptTimeout);
2645
+ it('should error if - missing body', (done) => {
2646
+ try {
2647
+ a.deleteGroup(null, null, (data, error) => {
2648
+ try {
2649
+ const displayE = 'body is required';
2650
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-deleteGroup', displayE);
2651
+ done();
2652
+ } catch (err) {
2653
+ log.error(`Test Failure: ${err}`);
2654
+ done(err);
2655
+ }
2656
+ });
2657
+ } catch (error) {
2658
+ log.error(`Adapter Exception: ${error}`);
2659
+ done(error);
2660
+ }
2661
+ }).timeout(attemptTimeout);
2662
+ });
2663
+
2664
+ describe('#deleteIdentityProvider - errors', () => {
2665
+ it('should have a deleteIdentityProvider function', (done) => {
2666
+ try {
2667
+ assert.equal(true, typeof a.deleteIdentityProvider === 'function');
2668
+ done();
2669
+ } catch (error) {
2670
+ log.error(`Test Failure: ${error}`);
2671
+ done(error);
2672
+ }
2673
+ }).timeout(attemptTimeout);
2674
+ it('should error if - missing body', (done) => {
2675
+ try {
2676
+ a.deleteIdentityProvider(null, null, (data, error) => {
2677
+ try {
2678
+ const displayE = 'body is required';
2679
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-deleteIdentityProvider', displayE);
2680
+ done();
2681
+ } catch (err) {
2682
+ log.error(`Test Failure: ${err}`);
2683
+ done(err);
2684
+ }
2685
+ });
2686
+ } catch (error) {
2687
+ log.error(`Adapter Exception: ${error}`);
2688
+ done(error);
2689
+ }
2690
+ }).timeout(attemptTimeout);
2691
+ });
2692
+
2693
+ describe('#deleteResourceServer - errors', () => {
2694
+ it('should have a deleteResourceServer function', (done) => {
2695
+ try {
2696
+ assert.equal(true, typeof a.deleteResourceServer === 'function');
2697
+ done();
2698
+ } catch (error) {
2699
+ log.error(`Test Failure: ${error}`);
2700
+ done(error);
2701
+ }
2702
+ }).timeout(attemptTimeout);
2703
+ it('should error if - missing body', (done) => {
2704
+ try {
2705
+ a.deleteResourceServer(null, null, (data, error) => {
2706
+ try {
2707
+ const displayE = 'body is required';
2708
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-deleteResourceServer', displayE);
2709
+ done();
2710
+ } catch (err) {
2711
+ log.error(`Test Failure: ${err}`);
2712
+ done(err);
2713
+ }
2714
+ });
2715
+ } catch (error) {
2716
+ log.error(`Adapter Exception: ${error}`);
2717
+ done(error);
2718
+ }
2719
+ }).timeout(attemptTimeout);
2720
+ });
2721
+
2722
+ describe('#deleteUser - errors', () => {
2723
+ it('should have a deleteUser function', (done) => {
2724
+ try {
2725
+ assert.equal(true, typeof a.deleteUser === 'function');
2726
+ done();
2727
+ } catch (error) {
2728
+ log.error(`Test Failure: ${error}`);
2729
+ done(error);
2730
+ }
2731
+ }).timeout(attemptTimeout);
2732
+ it('should error if - missing body', (done) => {
2733
+ try {
2734
+ a.deleteUser(null, null, (data, error) => {
2735
+ try {
2736
+ const displayE = 'body is required';
2737
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-deleteUser', displayE);
2738
+ done();
2739
+ } catch (err) {
2740
+ log.error(`Test Failure: ${err}`);
2741
+ done(err);
2742
+ }
2743
+ });
2744
+ } catch (error) {
2745
+ log.error(`Adapter Exception: ${error}`);
2746
+ done(error);
2747
+ }
2748
+ }).timeout(attemptTimeout);
2749
+ });
2750
+
2751
+ describe('#deleteUserAttributes - errors', () => {
2752
+ it('should have a deleteUserAttributes function', (done) => {
2753
+ try {
2754
+ assert.equal(true, typeof a.deleteUserAttributes === 'function');
2755
+ done();
2756
+ } catch (error) {
2757
+ log.error(`Test Failure: ${error}`);
2758
+ done(error);
2759
+ }
2760
+ }).timeout(attemptTimeout);
2761
+ it('should error if - missing body', (done) => {
2762
+ try {
2763
+ a.deleteUserAttributes(null, null, (data, error) => {
2764
+ try {
2765
+ const displayE = 'body is required';
2766
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-deleteUserAttributes', displayE);
2767
+ done();
2768
+ } catch (err) {
2769
+ log.error(`Test Failure: ${err}`);
2770
+ done(err);
2771
+ }
2772
+ });
2773
+ } catch (error) {
2774
+ log.error(`Adapter Exception: ${error}`);
2775
+ done(error);
2776
+ }
2777
+ }).timeout(attemptTimeout);
2778
+ });
2779
+
2780
+ describe('#deleteUserPool - errors', () => {
2781
+ it('should have a deleteUserPool function', (done) => {
2782
+ try {
2783
+ assert.equal(true, typeof a.deleteUserPool === 'function');
2784
+ done();
2785
+ } catch (error) {
2786
+ log.error(`Test Failure: ${error}`);
2787
+ done(error);
2788
+ }
2789
+ }).timeout(attemptTimeout);
2790
+ it('should error if - missing body', (done) => {
2791
+ try {
2792
+ a.deleteUserPool(null, null, (data, error) => {
2793
+ try {
2794
+ const displayE = 'body is required';
2795
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-deleteUserPool', displayE);
2796
+ done();
2797
+ } catch (err) {
2798
+ log.error(`Test Failure: ${err}`);
2799
+ done(err);
2800
+ }
2801
+ });
2802
+ } catch (error) {
2803
+ log.error(`Adapter Exception: ${error}`);
2804
+ done(error);
2805
+ }
2806
+ }).timeout(attemptTimeout);
2807
+ });
2808
+
2809
+ describe('#deleteUserPoolClient - errors', () => {
2810
+ it('should have a deleteUserPoolClient function', (done) => {
2811
+ try {
2812
+ assert.equal(true, typeof a.deleteUserPoolClient === 'function');
2813
+ done();
2814
+ } catch (error) {
2815
+ log.error(`Test Failure: ${error}`);
2816
+ done(error);
2817
+ }
2818
+ }).timeout(attemptTimeout);
2819
+ it('should error if - missing body', (done) => {
2820
+ try {
2821
+ a.deleteUserPoolClient(null, null, (data, error) => {
2822
+ try {
2823
+ const displayE = 'body is required';
2824
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-deleteUserPoolClient', displayE);
2825
+ done();
2826
+ } catch (err) {
2827
+ log.error(`Test Failure: ${err}`);
2828
+ done(err);
2829
+ }
2830
+ });
2831
+ } catch (error) {
2832
+ log.error(`Adapter Exception: ${error}`);
2833
+ done(error);
2834
+ }
2835
+ }).timeout(attemptTimeout);
2836
+ });
2837
+
2838
+ describe('#deleteUserPoolDomain - errors', () => {
2839
+ it('should have a deleteUserPoolDomain function', (done) => {
2840
+ try {
2841
+ assert.equal(true, typeof a.deleteUserPoolDomain === 'function');
2842
+ done();
2843
+ } catch (error) {
2844
+ log.error(`Test Failure: ${error}`);
2845
+ done(error);
2846
+ }
2847
+ }).timeout(attemptTimeout);
2848
+ it('should error if - missing body', (done) => {
2849
+ try {
2850
+ a.deleteUserPoolDomain(null, null, (data, error) => {
2851
+ try {
2852
+ const displayE = 'body is required';
2853
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-deleteUserPoolDomain', displayE);
2854
+ done();
2855
+ } catch (err) {
2856
+ log.error(`Test Failure: ${err}`);
2857
+ done(err);
2858
+ }
2859
+ });
2860
+ } catch (error) {
2861
+ log.error(`Adapter Exception: ${error}`);
2862
+ done(error);
2863
+ }
2864
+ }).timeout(attemptTimeout);
2865
+ });
2866
+
2867
+ describe('#describeIdentityProvider - errors', () => {
2868
+ it('should have a describeIdentityProvider function', (done) => {
2869
+ try {
2870
+ assert.equal(true, typeof a.describeIdentityProvider === 'function');
2871
+ done();
2872
+ } catch (error) {
2873
+ log.error(`Test Failure: ${error}`);
2874
+ done(error);
2875
+ }
2876
+ }).timeout(attemptTimeout);
2877
+ it('should error if - missing body', (done) => {
2878
+ try {
2879
+ a.describeIdentityProvider(null, null, (data, error) => {
2880
+ try {
2881
+ const displayE = 'body is required';
2882
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-describeIdentityProvider', displayE);
2883
+ done();
2884
+ } catch (err) {
2885
+ log.error(`Test Failure: ${err}`);
2886
+ done(err);
2887
+ }
2888
+ });
2889
+ } catch (error) {
2890
+ log.error(`Adapter Exception: ${error}`);
2891
+ done(error);
2892
+ }
2893
+ }).timeout(attemptTimeout);
2894
+ });
2895
+
2896
+ describe('#describeResourceServer - errors', () => {
2897
+ it('should have a describeResourceServer function', (done) => {
2898
+ try {
2899
+ assert.equal(true, typeof a.describeResourceServer === 'function');
2900
+ done();
2901
+ } catch (error) {
2902
+ log.error(`Test Failure: ${error}`);
2903
+ done(error);
2904
+ }
2905
+ }).timeout(attemptTimeout);
2906
+ it('should error if - missing body', (done) => {
2907
+ try {
2908
+ a.describeResourceServer(null, null, (data, error) => {
2909
+ try {
2910
+ const displayE = 'body is required';
2911
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-describeResourceServer', displayE);
2912
+ done();
2913
+ } catch (err) {
2914
+ log.error(`Test Failure: ${err}`);
2915
+ done(err);
2916
+ }
2917
+ });
2918
+ } catch (error) {
2919
+ log.error(`Adapter Exception: ${error}`);
2920
+ done(error);
2921
+ }
2922
+ }).timeout(attemptTimeout);
2923
+ });
2924
+
2925
+ describe('#describeRiskConfiguration - errors', () => {
2926
+ it('should have a describeRiskConfiguration function', (done) => {
2927
+ try {
2928
+ assert.equal(true, typeof a.describeRiskConfiguration === 'function');
2929
+ done();
2930
+ } catch (error) {
2931
+ log.error(`Test Failure: ${error}`);
2932
+ done(error);
2933
+ }
2934
+ }).timeout(attemptTimeout);
2935
+ it('should error if - missing body', (done) => {
2936
+ try {
2937
+ a.describeRiskConfiguration(null, null, (data, error) => {
2938
+ try {
2939
+ const displayE = 'body is required';
2940
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-describeRiskConfiguration', displayE);
2941
+ done();
2942
+ } catch (err) {
2943
+ log.error(`Test Failure: ${err}`);
2944
+ done(err);
2945
+ }
2946
+ });
2947
+ } catch (error) {
2948
+ log.error(`Adapter Exception: ${error}`);
2949
+ done(error);
2950
+ }
2951
+ }).timeout(attemptTimeout);
2952
+ });
2953
+
2954
+ describe('#describeUserImportJob - errors', () => {
2955
+ it('should have a describeUserImportJob function', (done) => {
2956
+ try {
2957
+ assert.equal(true, typeof a.describeUserImportJob === 'function');
2958
+ done();
2959
+ } catch (error) {
2960
+ log.error(`Test Failure: ${error}`);
2961
+ done(error);
2962
+ }
2963
+ }).timeout(attemptTimeout);
2964
+ it('should error if - missing body', (done) => {
2965
+ try {
2966
+ a.describeUserImportJob(null, null, (data, error) => {
2967
+ try {
2968
+ const displayE = 'body is required';
2969
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-describeUserImportJob', displayE);
2970
+ done();
2971
+ } catch (err) {
2972
+ log.error(`Test Failure: ${err}`);
2973
+ done(err);
2974
+ }
2975
+ });
2976
+ } catch (error) {
2977
+ log.error(`Adapter Exception: ${error}`);
2978
+ done(error);
2979
+ }
2980
+ }).timeout(attemptTimeout);
2981
+ });
2982
+
2983
+ describe('#describeUserPool - errors', () => {
2984
+ it('should have a describeUserPool function', (done) => {
2985
+ try {
2986
+ assert.equal(true, typeof a.describeUserPool === 'function');
2987
+ done();
2988
+ } catch (error) {
2989
+ log.error(`Test Failure: ${error}`);
2990
+ done(error);
2991
+ }
2992
+ }).timeout(attemptTimeout);
2993
+ it('should error if - missing body', (done) => {
2994
+ try {
2995
+ a.describeUserPool(null, null, (data, error) => {
2996
+ try {
2997
+ const displayE = 'body is required';
2998
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-describeUserPool', displayE);
2999
+ done();
3000
+ } catch (err) {
3001
+ log.error(`Test Failure: ${err}`);
3002
+ done(err);
3003
+ }
3004
+ });
3005
+ } catch (error) {
3006
+ log.error(`Adapter Exception: ${error}`);
3007
+ done(error);
3008
+ }
3009
+ }).timeout(attemptTimeout);
3010
+ });
3011
+
3012
+ describe('#describeUserPoolClient - errors', () => {
3013
+ it('should have a describeUserPoolClient function', (done) => {
3014
+ try {
3015
+ assert.equal(true, typeof a.describeUserPoolClient === 'function');
3016
+ done();
3017
+ } catch (error) {
3018
+ log.error(`Test Failure: ${error}`);
3019
+ done(error);
3020
+ }
3021
+ }).timeout(attemptTimeout);
3022
+ it('should error if - missing body', (done) => {
3023
+ try {
3024
+ a.describeUserPoolClient(null, null, (data, error) => {
3025
+ try {
3026
+ const displayE = 'body is required';
3027
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-describeUserPoolClient', displayE);
3028
+ done();
3029
+ } catch (err) {
3030
+ log.error(`Test Failure: ${err}`);
3031
+ done(err);
3032
+ }
3033
+ });
3034
+ } catch (error) {
3035
+ log.error(`Adapter Exception: ${error}`);
3036
+ done(error);
3037
+ }
3038
+ }).timeout(attemptTimeout);
3039
+ });
3040
+
3041
+ describe('#describeUserPoolDomain - errors', () => {
3042
+ it('should have a describeUserPoolDomain function', (done) => {
3043
+ try {
3044
+ assert.equal(true, typeof a.describeUserPoolDomain === 'function');
3045
+ done();
3046
+ } catch (error) {
3047
+ log.error(`Test Failure: ${error}`);
3048
+ done(error);
3049
+ }
3050
+ }).timeout(attemptTimeout);
3051
+ it('should error if - missing body', (done) => {
3052
+ try {
3053
+ a.describeUserPoolDomain(null, null, (data, error) => {
3054
+ try {
3055
+ const displayE = 'body is required';
3056
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-describeUserPoolDomain', displayE);
3057
+ done();
3058
+ } catch (err) {
3059
+ log.error(`Test Failure: ${err}`);
3060
+ done(err);
3061
+ }
3062
+ });
3063
+ } catch (error) {
3064
+ log.error(`Adapter Exception: ${error}`);
3065
+ done(error);
3066
+ }
3067
+ }).timeout(attemptTimeout);
3068
+ });
3069
+
3070
+ describe('#forgetDevice - errors', () => {
3071
+ it('should have a forgetDevice function', (done) => {
3072
+ try {
3073
+ assert.equal(true, typeof a.forgetDevice === 'function');
3074
+ done();
3075
+ } catch (error) {
3076
+ log.error(`Test Failure: ${error}`);
3077
+ done(error);
3078
+ }
3079
+ }).timeout(attemptTimeout);
3080
+ it('should error if - missing body', (done) => {
3081
+ try {
3082
+ a.forgetDevice(null, null, (data, error) => {
3083
+ try {
3084
+ const displayE = 'body is required';
3085
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-forgetDevice', displayE);
3086
+ done();
3087
+ } catch (err) {
3088
+ log.error(`Test Failure: ${err}`);
3089
+ done(err);
3090
+ }
3091
+ });
3092
+ } catch (error) {
3093
+ log.error(`Adapter Exception: ${error}`);
3094
+ done(error);
3095
+ }
3096
+ }).timeout(attemptTimeout);
3097
+ });
3098
+
3099
+ describe('#forgotPassword - errors', () => {
3100
+ it('should have a forgotPassword function', (done) => {
3101
+ try {
3102
+ assert.equal(true, typeof a.forgotPassword === 'function');
3103
+ done();
3104
+ } catch (error) {
3105
+ log.error(`Test Failure: ${error}`);
3106
+ done(error);
3107
+ }
3108
+ }).timeout(attemptTimeout);
3109
+ it('should error if - missing body', (done) => {
3110
+ try {
3111
+ a.forgotPassword(null, null, (data, error) => {
3112
+ try {
3113
+ const displayE = 'body is required';
3114
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-forgotPassword', displayE);
3115
+ done();
3116
+ } catch (err) {
3117
+ log.error(`Test Failure: ${err}`);
3118
+ done(err);
3119
+ }
3120
+ });
3121
+ } catch (error) {
3122
+ log.error(`Adapter Exception: ${error}`);
3123
+ done(error);
3124
+ }
3125
+ }).timeout(attemptTimeout);
3126
+ });
3127
+
3128
+ describe('#getCSVHeader - errors', () => {
3129
+ it('should have a getCSVHeader function', (done) => {
3130
+ try {
3131
+ assert.equal(true, typeof a.getCSVHeader === 'function');
3132
+ done();
3133
+ } catch (error) {
3134
+ log.error(`Test Failure: ${error}`);
3135
+ done(error);
3136
+ }
3137
+ }).timeout(attemptTimeout);
3138
+ it('should error if - missing body', (done) => {
3139
+ try {
3140
+ a.getCSVHeader(null, null, (data, error) => {
3141
+ try {
3142
+ const displayE = 'body is required';
3143
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-getCSVHeader', displayE);
3144
+ done();
3145
+ } catch (err) {
3146
+ log.error(`Test Failure: ${err}`);
3147
+ done(err);
3148
+ }
3149
+ });
3150
+ } catch (error) {
3151
+ log.error(`Adapter Exception: ${error}`);
3152
+ done(error);
3153
+ }
3154
+ }).timeout(attemptTimeout);
3155
+ });
3156
+
3157
+ describe('#getCognitoDevice - errors', () => {
3158
+ it('should have a getCognitoDevice function', (done) => {
3159
+ try {
3160
+ assert.equal(true, typeof a.getCognitoDevice === 'function');
3161
+ done();
3162
+ } catch (error) {
3163
+ log.error(`Test Failure: ${error}`);
3164
+ done(error);
3165
+ }
3166
+ }).timeout(attemptTimeout);
3167
+ it('should error if - missing body', (done) => {
3168
+ try {
3169
+ a.getCognitoDevice(null, null, (data, error) => {
3170
+ try {
3171
+ const displayE = 'body is required';
3172
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-getCognitoDevice', displayE);
3173
+ done();
3174
+ } catch (err) {
3175
+ log.error(`Test Failure: ${err}`);
3176
+ done(err);
3177
+ }
3178
+ });
3179
+ } catch (error) {
3180
+ log.error(`Adapter Exception: ${error}`);
3181
+ done(error);
3182
+ }
3183
+ }).timeout(attemptTimeout);
3184
+ });
3185
+
3186
+ describe('#getGroup - errors', () => {
3187
+ it('should have a getGroup function', (done) => {
3188
+ try {
3189
+ assert.equal(true, typeof a.getGroup === 'function');
3190
+ done();
3191
+ } catch (error) {
3192
+ log.error(`Test Failure: ${error}`);
3193
+ done(error);
3194
+ }
3195
+ }).timeout(attemptTimeout);
3196
+ it('should error if - missing body', (done) => {
3197
+ try {
3198
+ a.getGroup(null, null, (data, error) => {
3199
+ try {
3200
+ const displayE = 'body is required';
3201
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-getGroup', displayE);
3202
+ done();
3203
+ } catch (err) {
3204
+ log.error(`Test Failure: ${err}`);
3205
+ done(err);
3206
+ }
3207
+ });
3208
+ } catch (error) {
3209
+ log.error(`Adapter Exception: ${error}`);
3210
+ done(error);
3211
+ }
3212
+ }).timeout(attemptTimeout);
3213
+ });
3214
+
3215
+ describe('#getIdentityProviderByIdentifier - errors', () => {
3216
+ it('should have a getIdentityProviderByIdentifier function', (done) => {
3217
+ try {
3218
+ assert.equal(true, typeof a.getIdentityProviderByIdentifier === 'function');
3219
+ done();
3220
+ } catch (error) {
3221
+ log.error(`Test Failure: ${error}`);
3222
+ done(error);
3223
+ }
3224
+ }).timeout(attemptTimeout);
3225
+ it('should error if - missing body', (done) => {
3226
+ try {
3227
+ a.getIdentityProviderByIdentifier(null, null, (data, error) => {
3228
+ try {
3229
+ const displayE = 'body is required';
3230
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-getIdentityProviderByIdentifier', displayE);
3231
+ done();
3232
+ } catch (err) {
3233
+ log.error(`Test Failure: ${err}`);
3234
+ done(err);
3235
+ }
3236
+ });
3237
+ } catch (error) {
3238
+ log.error(`Adapter Exception: ${error}`);
3239
+ done(error);
3240
+ }
3241
+ }).timeout(attemptTimeout);
3242
+ });
3243
+
3244
+ describe('#getSigningCertificate - errors', () => {
3245
+ it('should have a getSigningCertificate function', (done) => {
3246
+ try {
3247
+ assert.equal(true, typeof a.getSigningCertificate === 'function');
3248
+ done();
3249
+ } catch (error) {
3250
+ log.error(`Test Failure: ${error}`);
3251
+ done(error);
3252
+ }
3253
+ }).timeout(attemptTimeout);
3254
+ it('should error if - missing body', (done) => {
3255
+ try {
3256
+ a.getSigningCertificate(null, null, (data, error) => {
3257
+ try {
3258
+ const displayE = 'body is required';
3259
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-getSigningCertificate', displayE);
3260
+ done();
3261
+ } catch (err) {
3262
+ log.error(`Test Failure: ${err}`);
3263
+ done(err);
3264
+ }
3265
+ });
3266
+ } catch (error) {
3267
+ log.error(`Adapter Exception: ${error}`);
3268
+ done(error);
3269
+ }
3270
+ }).timeout(attemptTimeout);
3271
+ });
3272
+
3273
+ describe('#getUICustomization - errors', () => {
3274
+ it('should have a getUICustomization function', (done) => {
3275
+ try {
3276
+ assert.equal(true, typeof a.getUICustomization === 'function');
3277
+ done();
3278
+ } catch (error) {
3279
+ log.error(`Test Failure: ${error}`);
3280
+ done(error);
3281
+ }
3282
+ }).timeout(attemptTimeout);
3283
+ it('should error if - missing body', (done) => {
3284
+ try {
3285
+ a.getUICustomization(null, null, (data, error) => {
3286
+ try {
3287
+ const displayE = 'body is required';
3288
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-getUICustomization', displayE);
3289
+ done();
3290
+ } catch (err) {
3291
+ log.error(`Test Failure: ${err}`);
3292
+ done(err);
3293
+ }
3294
+ });
3295
+ } catch (error) {
3296
+ log.error(`Adapter Exception: ${error}`);
3297
+ done(error);
3298
+ }
3299
+ }).timeout(attemptTimeout);
3300
+ });
3301
+
3302
+ describe('#getUser - errors', () => {
3303
+ it('should have a getUser function', (done) => {
3304
+ try {
3305
+ assert.equal(true, typeof a.getUser === 'function');
3306
+ done();
3307
+ } catch (error) {
3308
+ log.error(`Test Failure: ${error}`);
3309
+ done(error);
3310
+ }
3311
+ }).timeout(attemptTimeout);
3312
+ it('should error if - missing body', (done) => {
3313
+ try {
3314
+ a.getUser(null, null, (data, error) => {
3315
+ try {
3316
+ const displayE = 'body is required';
3317
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-getUser', displayE);
3318
+ done();
3319
+ } catch (err) {
3320
+ log.error(`Test Failure: ${err}`);
3321
+ done(err);
3322
+ }
3323
+ });
3324
+ } catch (error) {
3325
+ log.error(`Adapter Exception: ${error}`);
3326
+ done(error);
3327
+ }
3328
+ }).timeout(attemptTimeout);
3329
+ });
3330
+
3331
+ describe('#getUserAttributeVerificationCode - errors', () => {
3332
+ it('should have a getUserAttributeVerificationCode function', (done) => {
3333
+ try {
3334
+ assert.equal(true, typeof a.getUserAttributeVerificationCode === 'function');
3335
+ done();
3336
+ } catch (error) {
3337
+ log.error(`Test Failure: ${error}`);
3338
+ done(error);
3339
+ }
3340
+ }).timeout(attemptTimeout);
3341
+ it('should error if - missing body', (done) => {
3342
+ try {
3343
+ a.getUserAttributeVerificationCode(null, null, (data, error) => {
3344
+ try {
3345
+ const displayE = 'body is required';
3346
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-getUserAttributeVerificationCode', displayE);
3347
+ done();
3348
+ } catch (err) {
3349
+ log.error(`Test Failure: ${err}`);
3350
+ done(err);
3351
+ }
3352
+ });
3353
+ } catch (error) {
3354
+ log.error(`Adapter Exception: ${error}`);
3355
+ done(error);
3356
+ }
3357
+ }).timeout(attemptTimeout);
3358
+ });
3359
+
3360
+ describe('#getUserPoolMfaConfig - errors', () => {
3361
+ it('should have a getUserPoolMfaConfig function', (done) => {
3362
+ try {
3363
+ assert.equal(true, typeof a.getUserPoolMfaConfig === 'function');
3364
+ done();
3365
+ } catch (error) {
3366
+ log.error(`Test Failure: ${error}`);
3367
+ done(error);
3368
+ }
3369
+ }).timeout(attemptTimeout);
3370
+ it('should error if - missing body', (done) => {
3371
+ try {
3372
+ a.getUserPoolMfaConfig(null, null, (data, error) => {
3373
+ try {
3374
+ const displayE = 'body is required';
3375
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-getUserPoolMfaConfig', displayE);
3376
+ done();
3377
+ } catch (err) {
3378
+ log.error(`Test Failure: ${err}`);
3379
+ done(err);
3380
+ }
3381
+ });
3382
+ } catch (error) {
3383
+ log.error(`Adapter Exception: ${error}`);
3384
+ done(error);
3385
+ }
3386
+ }).timeout(attemptTimeout);
3387
+ });
3388
+
3389
+ describe('#globalSignOut - errors', () => {
3390
+ it('should have a globalSignOut function', (done) => {
3391
+ try {
3392
+ assert.equal(true, typeof a.globalSignOut === 'function');
3393
+ done();
3394
+ } catch (error) {
3395
+ log.error(`Test Failure: ${error}`);
3396
+ done(error);
3397
+ }
3398
+ }).timeout(attemptTimeout);
3399
+ it('should error if - missing body', (done) => {
3400
+ try {
3401
+ a.globalSignOut(null, null, (data, error) => {
3402
+ try {
3403
+ const displayE = 'body is required';
3404
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-globalSignOut', displayE);
3405
+ done();
3406
+ } catch (err) {
3407
+ log.error(`Test Failure: ${err}`);
3408
+ done(err);
3409
+ }
3410
+ });
3411
+ } catch (error) {
3412
+ log.error(`Adapter Exception: ${error}`);
3413
+ done(error);
3414
+ }
3415
+ }).timeout(attemptTimeout);
3416
+ });
3417
+
3418
+ describe('#initiateAuth - errors', () => {
3419
+ it('should have a initiateAuth function', (done) => {
3420
+ try {
3421
+ assert.equal(true, typeof a.initiateAuth === 'function');
3422
+ done();
3423
+ } catch (error) {
3424
+ log.error(`Test Failure: ${error}`);
3425
+ done(error);
3426
+ }
3427
+ }).timeout(attemptTimeout);
3428
+ it('should error if - missing body', (done) => {
3429
+ try {
3430
+ a.initiateAuth(null, null, (data, error) => {
3431
+ try {
3432
+ const displayE = 'body is required';
3433
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-initiateAuth', displayE);
3434
+ done();
3435
+ } catch (err) {
3436
+ log.error(`Test Failure: ${err}`);
3437
+ done(err);
3438
+ }
3439
+ });
3440
+ } catch (error) {
3441
+ log.error(`Adapter Exception: ${error}`);
3442
+ done(error);
3443
+ }
3444
+ }).timeout(attemptTimeout);
3445
+ });
3446
+
3447
+ describe('#listDevices - errors', () => {
3448
+ it('should have a listDevices function', (done) => {
3449
+ try {
3450
+ assert.equal(true, typeof a.listDevices === 'function');
3451
+ done();
3452
+ } catch (error) {
3453
+ log.error(`Test Failure: ${error}`);
3454
+ done(error);
3455
+ }
3456
+ }).timeout(attemptTimeout);
3457
+ it('should error if - missing body', (done) => {
3458
+ try {
3459
+ a.listDevices(null, null, (data, error) => {
3460
+ try {
3461
+ const displayE = 'body is required';
3462
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-listDevices', displayE);
3463
+ done();
3464
+ } catch (err) {
3465
+ log.error(`Test Failure: ${err}`);
3466
+ done(err);
3467
+ }
3468
+ });
3469
+ } catch (error) {
3470
+ log.error(`Adapter Exception: ${error}`);
3471
+ done(error);
3472
+ }
3473
+ }).timeout(attemptTimeout);
3474
+ });
3475
+
3476
+ describe('#listGroups - errors', () => {
3477
+ it('should have a listGroups function', (done) => {
3478
+ try {
3479
+ assert.equal(true, typeof a.listGroups === 'function');
3480
+ done();
3481
+ } catch (error) {
3482
+ log.error(`Test Failure: ${error}`);
3483
+ done(error);
3484
+ }
3485
+ }).timeout(attemptTimeout);
3486
+ it('should error if - missing body', (done) => {
3487
+ try {
3488
+ a.listGroups('fakeparam', 'fakeparam', null, null, (data, error) => {
3489
+ try {
3490
+ const displayE = 'body is required';
3491
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-listGroups', displayE);
3492
+ done();
3493
+ } catch (err) {
3494
+ log.error(`Test Failure: ${err}`);
3495
+ done(err);
3496
+ }
3497
+ });
3498
+ } catch (error) {
3499
+ log.error(`Adapter Exception: ${error}`);
3500
+ done(error);
3501
+ }
3502
+ }).timeout(attemptTimeout);
3503
+ });
3504
+
3505
+ describe('#listIdentityProviders - errors', () => {
3506
+ it('should have a listIdentityProviders function', (done) => {
3507
+ try {
3508
+ assert.equal(true, typeof a.listIdentityProviders === 'function');
3509
+ done();
3510
+ } catch (error) {
3511
+ log.error(`Test Failure: ${error}`);
3512
+ done(error);
3513
+ }
3514
+ }).timeout(attemptTimeout);
3515
+ it('should error if - missing body', (done) => {
3516
+ try {
3517
+ a.listIdentityProviders('fakeparam', 'fakeparam', null, null, (data, error) => {
3518
+ try {
3519
+ const displayE = 'body is required';
3520
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-listIdentityProviders', displayE);
3521
+ done();
3522
+ } catch (err) {
3523
+ log.error(`Test Failure: ${err}`);
3524
+ done(err);
3525
+ }
3526
+ });
3527
+ } catch (error) {
3528
+ log.error(`Adapter Exception: ${error}`);
3529
+ done(error);
3530
+ }
3531
+ }).timeout(attemptTimeout);
3532
+ });
3533
+
3534
+ describe('#listResourceServers - errors', () => {
3535
+ it('should have a listResourceServers function', (done) => {
3536
+ try {
3537
+ assert.equal(true, typeof a.listResourceServers === 'function');
3538
+ done();
3539
+ } catch (error) {
3540
+ log.error(`Test Failure: ${error}`);
3541
+ done(error);
3542
+ }
3543
+ }).timeout(attemptTimeout);
3544
+ it('should error if - missing body', (done) => {
3545
+ try {
3546
+ a.listResourceServers('fakeparam', 'fakeparam', null, null, (data, error) => {
3547
+ try {
3548
+ const displayE = 'body is required';
3549
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-listResourceServers', displayE);
3550
+ done();
3551
+ } catch (err) {
3552
+ log.error(`Test Failure: ${err}`);
3553
+ done(err);
3554
+ }
3555
+ });
3556
+ } catch (error) {
3557
+ log.error(`Adapter Exception: ${error}`);
3558
+ done(error);
3559
+ }
3560
+ }).timeout(attemptTimeout);
3561
+ });
3562
+
3563
+ describe('#listTagsForResource - errors', () => {
3564
+ it('should have a listTagsForResource function', (done) => {
3565
+ try {
3566
+ assert.equal(true, typeof a.listTagsForResource === 'function');
3567
+ done();
3568
+ } catch (error) {
3569
+ log.error(`Test Failure: ${error}`);
3570
+ done(error);
3571
+ }
3572
+ }).timeout(attemptTimeout);
3573
+ it('should error if - missing body', (done) => {
3574
+ try {
3575
+ a.listTagsForResource(null, null, (data, error) => {
3576
+ try {
3577
+ const displayE = 'body is required';
3578
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-listTagsForResource', displayE);
3579
+ done();
3580
+ } catch (err) {
3581
+ log.error(`Test Failure: ${err}`);
3582
+ done(err);
3583
+ }
3584
+ });
3585
+ } catch (error) {
3586
+ log.error(`Adapter Exception: ${error}`);
3587
+ done(error);
3588
+ }
3589
+ }).timeout(attemptTimeout);
3590
+ });
3591
+
3592
+ describe('#listUserImportJobs - errors', () => {
3593
+ it('should have a listUserImportJobs function', (done) => {
3594
+ try {
3595
+ assert.equal(true, typeof a.listUserImportJobs === 'function');
3596
+ done();
3597
+ } catch (error) {
3598
+ log.error(`Test Failure: ${error}`);
3599
+ done(error);
3600
+ }
3601
+ }).timeout(attemptTimeout);
3602
+ it('should error if - missing body', (done) => {
3603
+ try {
3604
+ a.listUserImportJobs(null, null, (data, error) => {
3605
+ try {
3606
+ const displayE = 'body is required';
3607
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-listUserImportJobs', displayE);
3608
+ done();
3609
+ } catch (err) {
3610
+ log.error(`Test Failure: ${err}`);
3611
+ done(err);
3612
+ }
3613
+ });
3614
+ } catch (error) {
3615
+ log.error(`Adapter Exception: ${error}`);
3616
+ done(error);
3617
+ }
3618
+ }).timeout(attemptTimeout);
3619
+ });
3620
+
3621
+ describe('#listUserPoolClients - errors', () => {
3622
+ it('should have a listUserPoolClients function', (done) => {
3623
+ try {
3624
+ assert.equal(true, typeof a.listUserPoolClients === 'function');
3625
+ done();
3626
+ } catch (error) {
3627
+ log.error(`Test Failure: ${error}`);
3628
+ done(error);
3629
+ }
3630
+ }).timeout(attemptTimeout);
3631
+ it('should error if - missing body', (done) => {
3632
+ try {
3633
+ a.listUserPoolClients('fakeparam', 'fakeparam', null, null, (data, error) => {
3634
+ try {
3635
+ const displayE = 'body is required';
3636
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-listUserPoolClients', displayE);
3637
+ done();
3638
+ } catch (err) {
3639
+ log.error(`Test Failure: ${err}`);
3640
+ done(err);
3641
+ }
3642
+ });
3643
+ } catch (error) {
3644
+ log.error(`Adapter Exception: ${error}`);
3645
+ done(error);
3646
+ }
3647
+ }).timeout(attemptTimeout);
3648
+ });
3649
+
3650
+ describe('#listUserPools - errors', () => {
3651
+ it('should have a listUserPools function', (done) => {
3652
+ try {
3653
+ assert.equal(true, typeof a.listUserPools === 'function');
3654
+ done();
3655
+ } catch (error) {
3656
+ log.error(`Test Failure: ${error}`);
3657
+ done(error);
3658
+ }
3659
+ }).timeout(attemptTimeout);
3660
+ it('should error if - missing body', (done) => {
3661
+ try {
3662
+ a.listUserPools('fakeparam', 'fakeparam', null, null, (data, error) => {
3663
+ try {
3664
+ const displayE = 'body is required';
3665
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-listUserPools', displayE);
3666
+ done();
3667
+ } catch (err) {
3668
+ log.error(`Test Failure: ${err}`);
3669
+ done(err);
3670
+ }
3671
+ });
3672
+ } catch (error) {
3673
+ log.error(`Adapter Exception: ${error}`);
3674
+ done(error);
3675
+ }
3676
+ }).timeout(attemptTimeout);
3677
+ });
3678
+
3679
+ describe('#listUsers - errors', () => {
3680
+ it('should have a listUsers function', (done) => {
3681
+ try {
3682
+ assert.equal(true, typeof a.listUsers === 'function');
3683
+ done();
3684
+ } catch (error) {
3685
+ log.error(`Test Failure: ${error}`);
3686
+ done(error);
3687
+ }
3688
+ }).timeout(attemptTimeout);
3689
+ it('should error if - missing body', (done) => {
3690
+ try {
3691
+ a.listUsers('fakeparam', 'fakeparam', null, null, (data, error) => {
3692
+ try {
3693
+ const displayE = 'body is required';
3694
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-listUsers', displayE);
3695
+ done();
3696
+ } catch (err) {
3697
+ log.error(`Test Failure: ${err}`);
3698
+ done(err);
3699
+ }
3700
+ });
3701
+ } catch (error) {
3702
+ log.error(`Adapter Exception: ${error}`);
3703
+ done(error);
3704
+ }
3705
+ }).timeout(attemptTimeout);
3706
+ });
3707
+
3708
+ describe('#listUsersInGroup - errors', () => {
3709
+ it('should have a listUsersInGroup function', (done) => {
3710
+ try {
3711
+ assert.equal(true, typeof a.listUsersInGroup === 'function');
3712
+ done();
3713
+ } catch (error) {
3714
+ log.error(`Test Failure: ${error}`);
3715
+ done(error);
3716
+ }
3717
+ }).timeout(attemptTimeout);
3718
+ it('should error if - missing body', (done) => {
3719
+ try {
3720
+ a.listUsersInGroup('fakeparam', 'fakeparam', null, null, (data, error) => {
3721
+ try {
3722
+ const displayE = 'body is required';
3723
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-listUsersInGroup', displayE);
3724
+ done();
3725
+ } catch (err) {
3726
+ log.error(`Test Failure: ${err}`);
3727
+ done(err);
3728
+ }
3729
+ });
3730
+ } catch (error) {
3731
+ log.error(`Adapter Exception: ${error}`);
3732
+ done(error);
3733
+ }
3734
+ }).timeout(attemptTimeout);
3735
+ });
3736
+
3737
+ describe('#resendConfirmationCode - errors', () => {
3738
+ it('should have a resendConfirmationCode function', (done) => {
3739
+ try {
3740
+ assert.equal(true, typeof a.resendConfirmationCode === 'function');
3741
+ done();
3742
+ } catch (error) {
3743
+ log.error(`Test Failure: ${error}`);
3744
+ done(error);
3745
+ }
3746
+ }).timeout(attemptTimeout);
3747
+ it('should error if - missing body', (done) => {
3748
+ try {
3749
+ a.resendConfirmationCode(null, null, (data, error) => {
3750
+ try {
3751
+ const displayE = 'body is required';
3752
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-resendConfirmationCode', displayE);
3753
+ done();
3754
+ } catch (err) {
3755
+ log.error(`Test Failure: ${err}`);
3756
+ done(err);
3757
+ }
3758
+ });
3759
+ } catch (error) {
3760
+ log.error(`Adapter Exception: ${error}`);
3761
+ done(error);
3762
+ }
3763
+ }).timeout(attemptTimeout);
3764
+ });
3765
+
3766
+ describe('#respondToAuthChallenge - errors', () => {
3767
+ it('should have a respondToAuthChallenge function', (done) => {
3768
+ try {
3769
+ assert.equal(true, typeof a.respondToAuthChallenge === 'function');
3770
+ done();
3771
+ } catch (error) {
3772
+ log.error(`Test Failure: ${error}`);
3773
+ done(error);
3774
+ }
3775
+ }).timeout(attemptTimeout);
3776
+ it('should error if - missing body', (done) => {
3777
+ try {
3778
+ a.respondToAuthChallenge(null, null, (data, error) => {
3779
+ try {
3780
+ const displayE = 'body is required';
3781
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-respondToAuthChallenge', displayE);
3782
+ done();
3783
+ } catch (err) {
3784
+ log.error(`Test Failure: ${err}`);
3785
+ done(err);
3786
+ }
3787
+ });
3788
+ } catch (error) {
3789
+ log.error(`Adapter Exception: ${error}`);
3790
+ done(error);
3791
+ }
3792
+ }).timeout(attemptTimeout);
3793
+ });
3794
+
3795
+ describe('#revokeToken - errors', () => {
3796
+ it('should have a revokeToken function', (done) => {
3797
+ try {
3798
+ assert.equal(true, typeof a.revokeToken === 'function');
3799
+ done();
3800
+ } catch (error) {
3801
+ log.error(`Test Failure: ${error}`);
3802
+ done(error);
3803
+ }
3804
+ }).timeout(attemptTimeout);
3805
+ it('should error if - missing body', (done) => {
3806
+ try {
3807
+ a.revokeToken(null, null, (data, error) => {
3808
+ try {
3809
+ const displayE = 'body is required';
3810
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-revokeToken', displayE);
3811
+ done();
3812
+ } catch (err) {
3813
+ log.error(`Test Failure: ${err}`);
3814
+ done(err);
3815
+ }
3816
+ });
3817
+ } catch (error) {
3818
+ log.error(`Adapter Exception: ${error}`);
3819
+ done(error);
3820
+ }
3821
+ }).timeout(attemptTimeout);
3822
+ });
3823
+
3824
+ describe('#setRiskConfiguration - errors', () => {
3825
+ it('should have a setRiskConfiguration function', (done) => {
3826
+ try {
3827
+ assert.equal(true, typeof a.setRiskConfiguration === 'function');
3828
+ done();
3829
+ } catch (error) {
3830
+ log.error(`Test Failure: ${error}`);
3831
+ done(error);
3832
+ }
3833
+ }).timeout(attemptTimeout);
3834
+ it('should error if - missing body', (done) => {
3835
+ try {
3836
+ a.setRiskConfiguration(null, null, (data, error) => {
3837
+ try {
3838
+ const displayE = 'body is required';
3839
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-setRiskConfiguration', displayE);
3840
+ done();
3841
+ } catch (err) {
3842
+ log.error(`Test Failure: ${err}`);
3843
+ done(err);
3844
+ }
3845
+ });
3846
+ } catch (error) {
3847
+ log.error(`Adapter Exception: ${error}`);
3848
+ done(error);
3849
+ }
3850
+ }).timeout(attemptTimeout);
3851
+ });
3852
+
3853
+ describe('#setUICustomization - errors', () => {
3854
+ it('should have a setUICustomization function', (done) => {
3855
+ try {
3856
+ assert.equal(true, typeof a.setUICustomization === 'function');
3857
+ done();
3858
+ } catch (error) {
3859
+ log.error(`Test Failure: ${error}`);
3860
+ done(error);
3861
+ }
3862
+ }).timeout(attemptTimeout);
3863
+ it('should error if - missing body', (done) => {
3864
+ try {
3865
+ a.setUICustomization(null, null, (data, error) => {
3866
+ try {
3867
+ const displayE = 'body is required';
3868
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-setUICustomization', displayE);
3869
+ done();
3870
+ } catch (err) {
3871
+ log.error(`Test Failure: ${err}`);
3872
+ done(err);
3873
+ }
3874
+ });
3875
+ } catch (error) {
3876
+ log.error(`Adapter Exception: ${error}`);
3877
+ done(error);
3878
+ }
3879
+ }).timeout(attemptTimeout);
3880
+ });
3881
+
3882
+ describe('#setUserMFAPreference - errors', () => {
3883
+ it('should have a setUserMFAPreference function', (done) => {
3884
+ try {
3885
+ assert.equal(true, typeof a.setUserMFAPreference === 'function');
3886
+ done();
3887
+ } catch (error) {
3888
+ log.error(`Test Failure: ${error}`);
3889
+ done(error);
3890
+ }
3891
+ }).timeout(attemptTimeout);
3892
+ it('should error if - missing body', (done) => {
3893
+ try {
3894
+ a.setUserMFAPreference(null, null, (data, error) => {
3895
+ try {
3896
+ const displayE = 'body is required';
3897
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-setUserMFAPreference', displayE);
3898
+ done();
3899
+ } catch (err) {
3900
+ log.error(`Test Failure: ${err}`);
3901
+ done(err);
3902
+ }
3903
+ });
3904
+ } catch (error) {
3905
+ log.error(`Adapter Exception: ${error}`);
3906
+ done(error);
3907
+ }
3908
+ }).timeout(attemptTimeout);
3909
+ });
3910
+
3911
+ describe('#setUserPoolMfaConfig - errors', () => {
3912
+ it('should have a setUserPoolMfaConfig function', (done) => {
3913
+ try {
3914
+ assert.equal(true, typeof a.setUserPoolMfaConfig === 'function');
3915
+ done();
3916
+ } catch (error) {
3917
+ log.error(`Test Failure: ${error}`);
3918
+ done(error);
3919
+ }
3920
+ }).timeout(attemptTimeout);
3921
+ it('should error if - missing body', (done) => {
3922
+ try {
3923
+ a.setUserPoolMfaConfig(null, null, (data, error) => {
3924
+ try {
3925
+ const displayE = 'body is required';
3926
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-setUserPoolMfaConfig', displayE);
3927
+ done();
3928
+ } catch (err) {
3929
+ log.error(`Test Failure: ${err}`);
3930
+ done(err);
3931
+ }
3932
+ });
3933
+ } catch (error) {
3934
+ log.error(`Adapter Exception: ${error}`);
3935
+ done(error);
3936
+ }
3937
+ }).timeout(attemptTimeout);
3938
+ });
3939
+
3940
+ describe('#setUserSettings - errors', () => {
3941
+ it('should have a setUserSettings function', (done) => {
3942
+ try {
3943
+ assert.equal(true, typeof a.setUserSettings === 'function');
3944
+ done();
3945
+ } catch (error) {
3946
+ log.error(`Test Failure: ${error}`);
3947
+ done(error);
3948
+ }
3949
+ }).timeout(attemptTimeout);
3950
+ it('should error if - missing body', (done) => {
3951
+ try {
3952
+ a.setUserSettings(null, null, (data, error) => {
3953
+ try {
3954
+ const displayE = 'body is required';
3955
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-setUserSettings', displayE);
3956
+ done();
3957
+ } catch (err) {
3958
+ log.error(`Test Failure: ${err}`);
3959
+ done(err);
3960
+ }
3961
+ });
3962
+ } catch (error) {
3963
+ log.error(`Adapter Exception: ${error}`);
3964
+ done(error);
3965
+ }
3966
+ }).timeout(attemptTimeout);
3967
+ });
3968
+
3969
+ describe('#signUp - errors', () => {
3970
+ it('should have a signUp function', (done) => {
3971
+ try {
3972
+ assert.equal(true, typeof a.signUp === 'function');
3973
+ done();
3974
+ } catch (error) {
3975
+ log.error(`Test Failure: ${error}`);
3976
+ done(error);
3977
+ }
3978
+ }).timeout(attemptTimeout);
3979
+ it('should error if - missing body', (done) => {
3980
+ try {
3981
+ a.signUp(null, null, (data, error) => {
3982
+ try {
3983
+ const displayE = 'body is required';
3984
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-signUp', displayE);
3985
+ done();
3986
+ } catch (err) {
3987
+ log.error(`Test Failure: ${err}`);
3988
+ done(err);
3989
+ }
3990
+ });
3991
+ } catch (error) {
3992
+ log.error(`Adapter Exception: ${error}`);
3993
+ done(error);
3994
+ }
3995
+ }).timeout(attemptTimeout);
3996
+ });
3997
+
3998
+ describe('#startUserImportJob - errors', () => {
3999
+ it('should have a startUserImportJob function', (done) => {
4000
+ try {
4001
+ assert.equal(true, typeof a.startUserImportJob === 'function');
4002
+ done();
4003
+ } catch (error) {
4004
+ log.error(`Test Failure: ${error}`);
4005
+ done(error);
4006
+ }
4007
+ }).timeout(attemptTimeout);
4008
+ it('should error if - missing body', (done) => {
4009
+ try {
4010
+ a.startUserImportJob(null, null, (data, error) => {
4011
+ try {
4012
+ const displayE = 'body is required';
4013
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-startUserImportJob', displayE);
4014
+ done();
4015
+ } catch (err) {
4016
+ log.error(`Test Failure: ${err}`);
4017
+ done(err);
4018
+ }
4019
+ });
4020
+ } catch (error) {
4021
+ log.error(`Adapter Exception: ${error}`);
4022
+ done(error);
4023
+ }
4024
+ }).timeout(attemptTimeout);
4025
+ });
4026
+
4027
+ describe('#stopUserImportJob - errors', () => {
4028
+ it('should have a stopUserImportJob function', (done) => {
4029
+ try {
4030
+ assert.equal(true, typeof a.stopUserImportJob === 'function');
4031
+ done();
4032
+ } catch (error) {
4033
+ log.error(`Test Failure: ${error}`);
4034
+ done(error);
4035
+ }
4036
+ }).timeout(attemptTimeout);
4037
+ it('should error if - missing body', (done) => {
4038
+ try {
4039
+ a.stopUserImportJob(null, null, (data, error) => {
4040
+ try {
4041
+ const displayE = 'body is required';
4042
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-stopUserImportJob', displayE);
4043
+ done();
4044
+ } catch (err) {
4045
+ log.error(`Test Failure: ${err}`);
4046
+ done(err);
4047
+ }
4048
+ });
4049
+ } catch (error) {
4050
+ log.error(`Adapter Exception: ${error}`);
4051
+ done(error);
4052
+ }
4053
+ }).timeout(attemptTimeout);
4054
+ });
4055
+
4056
+ describe('#tagResource - errors', () => {
4057
+ it('should have a tagResource function', (done) => {
4058
+ try {
4059
+ assert.equal(true, typeof a.tagResource === 'function');
4060
+ done();
4061
+ } catch (error) {
4062
+ log.error(`Test Failure: ${error}`);
4063
+ done(error);
4064
+ }
4065
+ }).timeout(attemptTimeout);
4066
+ it('should error if - missing body', (done) => {
4067
+ try {
4068
+ a.tagResource(null, null, (data, error) => {
4069
+ try {
4070
+ const displayE = 'body is required';
4071
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-tagResource', displayE);
4072
+ done();
4073
+ } catch (err) {
4074
+ log.error(`Test Failure: ${err}`);
4075
+ done(err);
4076
+ }
4077
+ });
4078
+ } catch (error) {
4079
+ log.error(`Adapter Exception: ${error}`);
4080
+ done(error);
4081
+ }
4082
+ }).timeout(attemptTimeout);
4083
+ });
4084
+
4085
+ describe('#untagResource - errors', () => {
4086
+ it('should have a untagResource function', (done) => {
4087
+ try {
4088
+ assert.equal(true, typeof a.untagResource === 'function');
4089
+ done();
4090
+ } catch (error) {
4091
+ log.error(`Test Failure: ${error}`);
4092
+ done(error);
4093
+ }
4094
+ }).timeout(attemptTimeout);
4095
+ it('should error if - missing body', (done) => {
4096
+ try {
4097
+ a.untagResource(null, null, (data, error) => {
4098
+ try {
4099
+ const displayE = 'body is required';
4100
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-untagResource', displayE);
4101
+ done();
4102
+ } catch (err) {
4103
+ log.error(`Test Failure: ${err}`);
4104
+ done(err);
4105
+ }
4106
+ });
4107
+ } catch (error) {
4108
+ log.error(`Adapter Exception: ${error}`);
4109
+ done(error);
4110
+ }
4111
+ }).timeout(attemptTimeout);
4112
+ });
4113
+
4114
+ describe('#updateAuthEventFeedback - errors', () => {
4115
+ it('should have a updateAuthEventFeedback function', (done) => {
4116
+ try {
4117
+ assert.equal(true, typeof a.updateAuthEventFeedback === 'function');
4118
+ done();
4119
+ } catch (error) {
4120
+ log.error(`Test Failure: ${error}`);
4121
+ done(error);
4122
+ }
4123
+ }).timeout(attemptTimeout);
4124
+ it('should error if - missing body', (done) => {
4125
+ try {
4126
+ a.updateAuthEventFeedback(null, null, (data, error) => {
4127
+ try {
4128
+ const displayE = 'body is required';
4129
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-updateAuthEventFeedback', displayE);
4130
+ done();
4131
+ } catch (err) {
4132
+ log.error(`Test Failure: ${err}`);
4133
+ done(err);
4134
+ }
4135
+ });
4136
+ } catch (error) {
4137
+ log.error(`Adapter Exception: ${error}`);
4138
+ done(error);
4139
+ }
4140
+ }).timeout(attemptTimeout);
4141
+ });
4142
+
4143
+ describe('#updateDeviceStatus - errors', () => {
4144
+ it('should have a updateDeviceStatus function', (done) => {
4145
+ try {
4146
+ assert.equal(true, typeof a.updateDeviceStatus === 'function');
4147
+ done();
4148
+ } catch (error) {
4149
+ log.error(`Test Failure: ${error}`);
4150
+ done(error);
4151
+ }
4152
+ }).timeout(attemptTimeout);
4153
+ it('should error if - missing body', (done) => {
4154
+ try {
4155
+ a.updateDeviceStatus(null, null, (data, error) => {
4156
+ try {
4157
+ const displayE = 'body is required';
4158
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-updateDeviceStatus', displayE);
4159
+ done();
4160
+ } catch (err) {
4161
+ log.error(`Test Failure: ${err}`);
4162
+ done(err);
4163
+ }
4164
+ });
4165
+ } catch (error) {
4166
+ log.error(`Adapter Exception: ${error}`);
4167
+ done(error);
4168
+ }
4169
+ }).timeout(attemptTimeout);
4170
+ });
4171
+
4172
+ describe('#updateGroup - errors', () => {
4173
+ it('should have a updateGroup function', (done) => {
4174
+ try {
4175
+ assert.equal(true, typeof a.updateGroup === 'function');
4176
+ done();
4177
+ } catch (error) {
4178
+ log.error(`Test Failure: ${error}`);
4179
+ done(error);
4180
+ }
4181
+ }).timeout(attemptTimeout);
4182
+ it('should error if - missing body', (done) => {
4183
+ try {
4184
+ a.updateGroup(null, null, (data, error) => {
4185
+ try {
4186
+ const displayE = 'body is required';
4187
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-updateGroup', displayE);
4188
+ done();
4189
+ } catch (err) {
4190
+ log.error(`Test Failure: ${err}`);
4191
+ done(err);
4192
+ }
4193
+ });
4194
+ } catch (error) {
4195
+ log.error(`Adapter Exception: ${error}`);
4196
+ done(error);
4197
+ }
4198
+ }).timeout(attemptTimeout);
4199
+ });
4200
+
4201
+ describe('#updateIdentityProvider - errors', () => {
4202
+ it('should have a updateIdentityProvider function', (done) => {
4203
+ try {
4204
+ assert.equal(true, typeof a.updateIdentityProvider === 'function');
4205
+ done();
4206
+ } catch (error) {
4207
+ log.error(`Test Failure: ${error}`);
4208
+ done(error);
4209
+ }
4210
+ }).timeout(attemptTimeout);
4211
+ it('should error if - missing body', (done) => {
4212
+ try {
4213
+ a.updateIdentityProvider(null, null, (data, error) => {
4214
+ try {
4215
+ const displayE = 'body is required';
4216
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-updateIdentityProvider', displayE);
4217
+ done();
4218
+ } catch (err) {
4219
+ log.error(`Test Failure: ${err}`);
4220
+ done(err);
4221
+ }
4222
+ });
4223
+ } catch (error) {
4224
+ log.error(`Adapter Exception: ${error}`);
4225
+ done(error);
4226
+ }
4227
+ }).timeout(attemptTimeout);
4228
+ });
4229
+
4230
+ describe('#updateResourceServer - errors', () => {
4231
+ it('should have a updateResourceServer function', (done) => {
4232
+ try {
4233
+ assert.equal(true, typeof a.updateResourceServer === 'function');
4234
+ done();
4235
+ } catch (error) {
4236
+ log.error(`Test Failure: ${error}`);
4237
+ done(error);
4238
+ }
4239
+ }).timeout(attemptTimeout);
4240
+ it('should error if - missing body', (done) => {
4241
+ try {
4242
+ a.updateResourceServer(null, null, (data, error) => {
4243
+ try {
4244
+ const displayE = 'body is required';
4245
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-updateResourceServer', displayE);
4246
+ done();
4247
+ } catch (err) {
4248
+ log.error(`Test Failure: ${err}`);
4249
+ done(err);
4250
+ }
4251
+ });
4252
+ } catch (error) {
4253
+ log.error(`Adapter Exception: ${error}`);
4254
+ done(error);
4255
+ }
4256
+ }).timeout(attemptTimeout);
4257
+ });
4258
+
4259
+ describe('#updateUserAttributes - errors', () => {
4260
+ it('should have a updateUserAttributes function', (done) => {
4261
+ try {
4262
+ assert.equal(true, typeof a.updateUserAttributes === 'function');
4263
+ done();
4264
+ } catch (error) {
4265
+ log.error(`Test Failure: ${error}`);
4266
+ done(error);
4267
+ }
4268
+ }).timeout(attemptTimeout);
4269
+ it('should error if - missing body', (done) => {
4270
+ try {
4271
+ a.updateUserAttributes(null, null, (data, error) => {
4272
+ try {
4273
+ const displayE = 'body is required';
4274
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-updateUserAttributes', displayE);
4275
+ done();
4276
+ } catch (err) {
4277
+ log.error(`Test Failure: ${err}`);
4278
+ done(err);
4279
+ }
4280
+ });
4281
+ } catch (error) {
4282
+ log.error(`Adapter Exception: ${error}`);
4283
+ done(error);
4284
+ }
4285
+ }).timeout(attemptTimeout);
4286
+ });
4287
+
4288
+ describe('#updateUserPool - errors', () => {
4289
+ it('should have a updateUserPool function', (done) => {
4290
+ try {
4291
+ assert.equal(true, typeof a.updateUserPool === 'function');
4292
+ done();
4293
+ } catch (error) {
4294
+ log.error(`Test Failure: ${error}`);
4295
+ done(error);
4296
+ }
4297
+ }).timeout(attemptTimeout);
4298
+ it('should error if - missing body', (done) => {
4299
+ try {
4300
+ a.updateUserPool(null, null, (data, error) => {
4301
+ try {
4302
+ const displayE = 'body is required';
4303
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-updateUserPool', displayE);
4304
+ done();
4305
+ } catch (err) {
4306
+ log.error(`Test Failure: ${err}`);
4307
+ done(err);
4308
+ }
4309
+ });
4310
+ } catch (error) {
4311
+ log.error(`Adapter Exception: ${error}`);
4312
+ done(error);
4313
+ }
4314
+ }).timeout(attemptTimeout);
4315
+ });
4316
+
4317
+ describe('#updateUserPoolClient - errors', () => {
4318
+ it('should have a updateUserPoolClient function', (done) => {
4319
+ try {
4320
+ assert.equal(true, typeof a.updateUserPoolClient === 'function');
4321
+ done();
4322
+ } catch (error) {
4323
+ log.error(`Test Failure: ${error}`);
4324
+ done(error);
4325
+ }
4326
+ }).timeout(attemptTimeout);
4327
+ it('should error if - missing body', (done) => {
4328
+ try {
4329
+ a.updateUserPoolClient(null, null, (data, error) => {
4330
+ try {
4331
+ const displayE = 'body is required';
4332
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-updateUserPoolClient', displayE);
4333
+ done();
4334
+ } catch (err) {
4335
+ log.error(`Test Failure: ${err}`);
4336
+ done(err);
4337
+ }
4338
+ });
4339
+ } catch (error) {
4340
+ log.error(`Adapter Exception: ${error}`);
4341
+ done(error);
4342
+ }
4343
+ }).timeout(attemptTimeout);
4344
+ });
4345
+
4346
+ describe('#updateUserPoolDomain - errors', () => {
4347
+ it('should have a updateUserPoolDomain function', (done) => {
4348
+ try {
4349
+ assert.equal(true, typeof a.updateUserPoolDomain === 'function');
4350
+ done();
4351
+ } catch (error) {
4352
+ log.error(`Test Failure: ${error}`);
4353
+ done(error);
4354
+ }
4355
+ }).timeout(attemptTimeout);
4356
+ it('should error if - missing body', (done) => {
4357
+ try {
4358
+ a.updateUserPoolDomain(null, null, (data, error) => {
4359
+ try {
4360
+ const displayE = 'body is required';
4361
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-updateUserPoolDomain', displayE);
4362
+ done();
4363
+ } catch (err) {
4364
+ log.error(`Test Failure: ${err}`);
4365
+ done(err);
4366
+ }
4367
+ });
4368
+ } catch (error) {
4369
+ log.error(`Adapter Exception: ${error}`);
4370
+ done(error);
4371
+ }
4372
+ }).timeout(attemptTimeout);
4373
+ });
4374
+
4375
+ describe('#verifySoftwareToken - errors', () => {
4376
+ it('should have a verifySoftwareToken function', (done) => {
4377
+ try {
4378
+ assert.equal(true, typeof a.verifySoftwareToken === 'function');
4379
+ done();
4380
+ } catch (error) {
4381
+ log.error(`Test Failure: ${error}`);
4382
+ done(error);
4383
+ }
4384
+ }).timeout(attemptTimeout);
4385
+ it('should error if - missing body', (done) => {
4386
+ try {
4387
+ a.verifySoftwareToken(null, null, (data, error) => {
4388
+ try {
4389
+ const displayE = 'body is required';
4390
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-verifySoftwareToken', displayE);
4391
+ done();
4392
+ } catch (err) {
4393
+ log.error(`Test Failure: ${err}`);
4394
+ done(err);
4395
+ }
4396
+ });
4397
+ } catch (error) {
4398
+ log.error(`Adapter Exception: ${error}`);
4399
+ done(error);
4400
+ }
4401
+ }).timeout(attemptTimeout);
4402
+ });
4403
+
4404
+ describe('#verifyUserAttribute - errors', () => {
4405
+ it('should have a verifyUserAttribute function', (done) => {
4406
+ try {
4407
+ assert.equal(true, typeof a.verifyUserAttribute === 'function');
4408
+ done();
4409
+ } catch (error) {
4410
+ log.error(`Test Failure: ${error}`);
4411
+ done(error);
4412
+ }
4413
+ }).timeout(attemptTimeout);
4414
+ it('should error if - missing body', (done) => {
4415
+ try {
4416
+ a.verifyUserAttribute(null, null, (data, error) => {
4417
+ try {
4418
+ const displayE = 'body is required';
4419
+ runErrorAsserts(data, error, 'AD.300', 'Test-aws_cognito_identity_provider-adapter-verifyUserAttribute', displayE);
4420
+ done();
4421
+ } catch (err) {
4422
+ log.error(`Test Failure: ${err}`);
4423
+ done(err);
4424
+ }
4425
+ });
4426
+ } catch (error) {
4427
+ log.error(`Adapter Exception: ${error}`);
4428
+ done(error);
4429
+ }
4430
+ }).timeout(attemptTimeout);
4431
+ });
4432
+ });
4433
+ });