create-qpq-app 0.1.25 → 0.1.27

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 (283) hide show
  1. package/package.json +2 -2
  2. package/template/README.md +4 -0
  3. package/template/apps/qpqjs/account.qpq.ts +4 -0
  4. package/template/apps/qpqjs/bootstrap.qpq.ts +13 -2
  5. package/template/apps/qpqjs/packages/service-utils/src/defineQpqjsService.ts +4 -0
  6. package/template/apps/qpqjs/services/test/models/src/SmokeProbeRecord.ts +12 -0
  7. package/template/apps/qpqjs/services/test/models/src/SmokeRunSummary.ts +8 -1
  8. package/template/apps/qpqjs/services/test/models/src/SmokeTestStatus.ts +2 -0
  9. package/template/apps/qpqjs/services/test/service/src/infrastructure.ts +0 -6
  10. package/template/apps/qpqjs/services/test/service/src/smoke/config/defineSmoke.ts +8 -174
  11. package/template/apps/qpqjs/services/test/service/src/smoke/harness/assert/askSmokePollForMarker.ts +44 -0
  12. package/template/apps/qpqjs/services/test/service/src/smoke/harness/assert/index.ts +2 -0
  13. package/template/apps/qpqjs/services/test/service/src/smoke/harness/config/defineSmokeHarness.ts +115 -0
  14. package/template/apps/qpqjs/services/test/service/src/smoke/harness/config/index.ts +1 -0
  15. package/template/apps/qpqjs/services/test/service/src/smoke/{constants → harness/constants}/index.ts +0 -2
  16. package/template/apps/qpqjs/services/test/service/src/smoke/harness/index.ts +10 -0
  17. package/template/apps/qpqjs/services/test/service/src/smoke/{logic → harness/logic}/smokeRun/askExecuteSmokeTest.ts +6 -5
  18. package/template/apps/qpqjs/services/test/service/src/smoke/harness/logic/smokeRun/askStartSmokeRun.ts +85 -0
  19. package/template/apps/qpqjs/services/test/service/src/smoke/{logic → harness/logic}/smokeRun/index.ts +1 -0
  20. package/template/apps/qpqjs/services/test/service/src/smoke/harness/logic/smokeRun/listSmokeTests.ts +6 -0
  21. package/template/apps/qpqjs/services/test/service/src/smoke/{logic → harness/logic}/smokeRun/summarizeSmokeRun.ts +5 -1
  22. package/template/apps/qpqjs/services/test/service/src/smoke/{models → harness/models}/SmokeTestRequestedQueueEvent.ts +1 -1
  23. package/template/apps/qpqjs/services/test/service/src/smoke/harness/models/index.ts +2 -0
  24. package/template/apps/qpqjs/services/test/service/src/smoke/harness/queue/index.ts +1 -0
  25. package/template/apps/qpqjs/services/test/service/src/smoke/harness/types/SmokeSuite.ts +13 -0
  26. package/template/apps/qpqjs/services/test/service/src/smoke/{tests → harness/types}/SmokeTestDefinition.ts +3 -0
  27. package/template/apps/qpqjs/services/test/service/src/smoke/harness/types/index.ts +2 -0
  28. package/template/apps/qpqjs/services/test/service/src/smoke/index.ts +2 -9
  29. package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/config/defineEmailReceiveSmoke.ts +20 -0
  30. package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/config/index.ts +1 -0
  31. package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/constants/SMOKE_EMAIL_RECEIVER.ts +2 -0
  32. package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/constants/index.ts +1 -0
  33. package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/emailReceiveSmokeSuite.ts +15 -0
  34. package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/entry/email/index.ts +1 -0
  35. package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/entry/email/onSmokeEmailReceived.ts +33 -0
  36. package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/entry/index.ts +1 -0
  37. package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/index.ts +5 -0
  38. package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/logic/askRunEmailReceiveTest.ts +41 -0
  39. package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/logic/index.ts +2 -0
  40. package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/logic/smokeEmailMarkerId.ts +4 -0
  41. package/template/apps/qpqjs/services/test/service/src/smoke/suites/encryptedResources/config/defineEncryptedResourcesSmoke.ts +29 -0
  42. package/template/apps/qpqjs/services/test/service/src/smoke/suites/encryptedResources/config/index.ts +1 -0
  43. package/template/apps/qpqjs/services/test/service/src/smoke/suites/encryptedResources/constants/SMOKE_CRYPTO_KEY.ts +5 -0
  44. package/template/apps/qpqjs/services/test/service/src/smoke/suites/encryptedResources/constants/SMOKE_ENCRYPTED_PROBE_DRIVE.ts +2 -0
  45. package/template/apps/qpqjs/services/test/service/src/smoke/suites/encryptedResources/constants/SMOKE_ENCRYPTED_PROBE_STORE.ts +2 -0
  46. package/template/apps/qpqjs/services/test/service/src/smoke/suites/encryptedResources/constants/index.ts +3 -0
  47. package/template/apps/qpqjs/services/test/service/src/smoke/suites/encryptedResources/encryptedResourcesSmokeSuite.ts +9 -0
  48. package/template/apps/qpqjs/services/test/service/src/smoke/suites/encryptedResources/index.ts +4 -0
  49. package/template/apps/qpqjs/services/test/service/src/smoke/suites/encryptedResources/logic/askRunEncryptedResourcesTest.ts +61 -0
  50. package/template/apps/qpqjs/services/test/service/src/smoke/suites/encryptedResources/logic/index.ts +1 -0
  51. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/config/defineEventBusSmoke.ts +21 -0
  52. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/config/index.ts +1 -0
  53. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/constants/SMOKE_PROBE_EVENT_BUS.ts +2 -0
  54. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/constants/SMOKE_PROBE_EVENT_QUEUE.ts +2 -0
  55. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/constants/SMOKE_PROBE_EVENT_TYPE.ts +2 -0
  56. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/constants/index.ts +3 -0
  57. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/entry/index.ts +1 -0
  58. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/entry/queue/index.ts +1 -0
  59. package/template/apps/qpqjs/services/test/service/src/smoke/{queue → suites/eventBus/entry/queue}/onSmokeProbeEvent.ts +1 -1
  60. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/eventBusSmokeSuite.ts +9 -0
  61. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/index.ts +6 -0
  62. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/logic/askRunEventBusTest.ts +31 -0
  63. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/models/index.ts +1 -0
  64. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventDoc/config/defineEventDocSmoke.ts +44 -0
  65. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventDoc/config/index.ts +1 -0
  66. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventDoc/constants/index.ts +1 -0
  67. package/template/apps/qpqjs/services/test/service/src/smoke/{constants → suites/eventDoc/constants}/smokeEventDoc.ts +1 -1
  68. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventDoc/entry/index.ts +1 -0
  69. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventDoc/entry/queue/index.ts +1 -0
  70. package/template/apps/qpqjs/services/test/service/src/smoke/{queue → suites/eventDoc/entry/queue}/onSmokeEventDocAppend.ts +3 -3
  71. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventDoc/eventDocSmokeSuite.ts +19 -0
  72. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventDoc/index.ts +7 -0
  73. package/template/apps/qpqjs/services/test/service/src/smoke/{tests/eventDoc → suites/eventDoc/logic}/askAssertContiguousEventIds.ts +1 -1
  74. package/template/apps/qpqjs/services/test/service/src/smoke/{tests/eventDoc → suites/eventDoc/logic}/askAssertSmokeProbeDocState.ts +2 -2
  75. package/template/apps/qpqjs/services/test/service/src/smoke/{tests/eventDoc → suites/eventDoc/logic}/askAwaitSmokeEventDocLog.ts +3 -2
  76. package/template/apps/qpqjs/services/test/service/src/smoke/{tests/eventDoc → suites/eventDoc/logic}/askRunEventDocConcurrentAppendTest.ts +5 -5
  77. package/template/apps/qpqjs/services/test/service/src/smoke/{tests/eventDoc → suites/eventDoc/logic}/askRunEventDocInterleavedBatchAppendTest.ts +4 -4
  78. package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventDoc/models/index.ts +2 -0
  79. package/template/apps/qpqjs/services/test/service/src/smoke/suites/index.ts +17 -0
  80. package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStore/index.ts +2 -0
  81. package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStore/keyValueStoreSmokeSuite.ts +14 -0
  82. package/template/apps/qpqjs/services/test/service/src/smoke/{tests/crossService → suites/keyValueStore/logic}/askRunCrossServiceKeyValueStoreTest.ts +1 -1
  83. package/template/apps/qpqjs/services/test/service/src/smoke/{tests/keyValueStore → suites/keyValueStore/logic}/askRunKeyValueStoreTest.ts +1 -1
  84. package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStore/logic/index.ts +2 -0
  85. package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/config/defineKeyValueStoreStreamSmoke.ts +30 -0
  86. package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/config/index.ts +1 -0
  87. package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/constants/SMOKE_STREAM_PROBE_STORE.ts +2 -0
  88. package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/constants/index.ts +1 -0
  89. package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/entry/index.ts +1 -0
  90. package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/entry/kvsStream/index.ts +1 -0
  91. package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/entry/kvsStream/onSmokeStreamRecord.ts +33 -0
  92. package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/index.ts +5 -0
  93. package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/keyValueStoreStreamSmokeSuite.ts +11 -0
  94. package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/logic/askRunKeyValueStoreStreamTest.ts +69 -0
  95. package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/logic/index.ts +2 -0
  96. package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/logic/smokeStreamMarkerId.ts +8 -0
  97. package/template/apps/qpqjs/services/test/service/src/smoke/suites/noop/index.ts +2 -0
  98. package/template/apps/qpqjs/services/test/service/src/smoke/suites/noop/noopSmokeSuite.ts +7 -0
  99. package/template/apps/qpqjs/services/test/service/src/smoke/suites/openApi/config/defineOpenApiSmoke.ts +13 -0
  100. package/template/apps/qpqjs/services/test/service/src/smoke/suites/openApi/config/index.ts +1 -0
  101. package/template/apps/qpqjs/services/test/service/src/smoke/suites/openApi/index.ts +4 -0
  102. package/template/apps/qpqjs/services/test/service/src/smoke/{tests/openApi → suites/openApi/logic}/askRunEchoRoundTripTest.ts +1 -1
  103. package/template/apps/qpqjs/services/test/service/src/smoke/{tests/openApi → suites/openApi/logic}/askRunOpenApiDocumentTest.ts +1 -1
  104. package/template/apps/qpqjs/services/test/service/src/smoke/suites/openApi/openApiSmokeSuite.ts +13 -0
  105. package/template/apps/qpqjs/services/test/service/src/smoke/suites/parameter/config/defineParameterSmoke.ts +11 -0
  106. package/template/apps/qpqjs/services/test/service/src/smoke/suites/parameter/config/index.ts +1 -0
  107. package/template/apps/qpqjs/services/test/service/src/smoke/suites/parameter/constants/SMOKE_PROBE_PARAMETER.ts +2 -0
  108. package/template/apps/qpqjs/services/test/service/src/smoke/suites/parameter/constants/SMOKE_PROBE_PARAMETER_VALUE.ts +2 -0
  109. package/template/apps/qpqjs/services/test/service/src/smoke/suites/parameter/constants/index.ts +2 -0
  110. package/template/apps/qpqjs/services/test/service/src/smoke/suites/parameter/index.ts +4 -0
  111. package/template/apps/qpqjs/services/test/service/src/smoke/{tests/parameter → suites/parameter/logic}/askRunParameterTest.ts +3 -5
  112. package/template/apps/qpqjs/services/test/service/src/smoke/suites/parameter/parameterSmokeSuite.ts +9 -0
  113. package/template/apps/qpqjs/services/test/service/src/{tick/config/defineTick.ts → smoke/suites/schedule/config/defineScheduleSmoke.ts} +1 -1
  114. package/template/apps/qpqjs/services/test/service/src/smoke/suites/schedule/config/index.ts +1 -0
  115. package/template/apps/qpqjs/services/test/service/src/smoke/suites/schedule/entry/index.ts +2 -0
  116. package/template/apps/qpqjs/services/test/service/src/smoke/suites/schedule/index.ts +6 -0
  117. package/template/apps/qpqjs/services/test/service/src/smoke/{tests/schedule → suites/schedule/logic}/askRunScheduleTest.ts +4 -4
  118. package/template/apps/qpqjs/services/test/service/src/smoke/suites/schedule/scheduleSmokeSuite.ts +9 -0
  119. package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedKeyValueStore/config/defineScopedKeyValueStoreSmoke.ts +19 -0
  120. package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedKeyValueStore/config/index.ts +1 -0
  121. package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedKeyValueStore/constants/SMOKE_SCOPED_PROBE_STORE.ts +2 -0
  122. package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedKeyValueStore/constants/index.ts +1 -0
  123. package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedKeyValueStore/index.ts +4 -0
  124. package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedKeyValueStore/logic/askRunScopedKeyValueStoreTest.ts +256 -0
  125. package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedKeyValueStore/logic/index.ts +1 -0
  126. package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedKeyValueStore/scopedKeyValueStoreSmokeSuite.ts +11 -0
  127. package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedStorageDrive/config/defineScopedStorageDriveSmoke.ts +12 -0
  128. package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedStorageDrive/config/index.ts +1 -0
  129. package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedStorageDrive/constants/SMOKE_SCOPED_PROBE_DRIVE.ts +2 -0
  130. package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedStorageDrive/constants/index.ts +1 -0
  131. package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedStorageDrive/index.ts +4 -0
  132. package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedStorageDrive/logic/askRunScopedStorageDriveTest.ts +116 -0
  133. package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedStorageDrive/logic/index.ts +1 -0
  134. package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedStorageDrive/scopedStorageDriveSmokeSuite.ts +9 -0
  135. package/template/apps/qpqjs/services/test/service/src/smoke/suites/secret/config/defineSecretSmoke.ts +8 -0
  136. package/template/apps/qpqjs/services/test/service/src/smoke/suites/secret/config/index.ts +1 -0
  137. package/template/apps/qpqjs/services/test/service/src/smoke/suites/secret/constants/SMOKE_PROBE_SECRET.ts +2 -0
  138. package/template/apps/qpqjs/services/test/service/src/smoke/suites/secret/constants/index.ts +1 -0
  139. package/template/apps/qpqjs/services/test/service/src/smoke/suites/secret/index.ts +4 -0
  140. package/template/apps/qpqjs/services/test/service/src/smoke/{tests/secret → suites/secret/logic}/askRunSecretTest.ts +2 -2
  141. package/template/apps/qpqjs/services/test/service/src/smoke/suites/secret/secretSmokeSuite.ts +9 -0
  142. package/template/apps/qpqjs/services/test/service/src/smoke/suites/signingKey/config/defineSigningKeySmoke.ts +12 -0
  143. package/template/apps/qpqjs/services/test/service/src/smoke/suites/signingKey/config/index.ts +1 -0
  144. package/template/apps/qpqjs/services/test/service/src/smoke/suites/signingKey/index.ts +3 -0
  145. package/template/apps/qpqjs/services/test/service/src/smoke/{tests/crossService → suites/signingKey/logic}/askRunCrossServiceSigningKeyTest.ts +1 -1
  146. package/template/apps/qpqjs/services/test/service/src/smoke/{tests/signingKey → suites/signingKey/logic}/askRunSigningKeyTest.ts +1 -1
  147. package/template/apps/qpqjs/services/test/service/src/smoke/suites/signingKey/logic/index.ts +2 -0
  148. package/template/apps/qpqjs/services/test/service/src/smoke/suites/signingKey/signingKeySmokeSuite.ts +16 -0
  149. package/template/apps/qpqjs/services/test/service/src/smoke/suites/smokeSuites.ts +46 -0
  150. package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDrive/index.ts +2 -0
  151. package/template/apps/qpqjs/services/test/service/src/smoke/{tests/crossService → suites/storageDrive/logic}/askRunCrossServiceStorageDriveTest.ts +1 -1
  152. package/template/apps/qpqjs/services/test/service/src/smoke/{tests/storageDrive → suites/storageDrive/logic}/askRunStorageDriveTest.ts +1 -1
  153. package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDrive/logic/index.ts +2 -0
  154. package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDrive/storageDriveSmokeSuite.ts +14 -0
  155. package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/config/defineStorageDriveEventSmoke.ts +27 -0
  156. package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/config/index.ts +1 -0
  157. package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/constants/SMOKE_FILE_EVENT_DRIVE.ts +2 -0
  158. package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/constants/SMOKE_SCOPED_FILE_EVENT_DRIVE.ts +2 -0
  159. package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/constants/index.ts +2 -0
  160. package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/entry/index.ts +1 -0
  161. package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/entry/storageDrive/index.ts +1 -0
  162. package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/entry/storageDrive/onSmokeFileEvent.ts +38 -0
  163. package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/index.ts +5 -0
  164. package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/logic/askRunStorageDriveEventTest.ts +78 -0
  165. package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/logic/index.ts +2 -0
  166. package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/logic/smokeFileEventMarkerId.ts +14 -0
  167. package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/storageDriveEventSmokeSuite.ts +9 -0
  168. package/template/apps/qpqjs/services/testa/models/src/CrossServiceProbePayload.ts +1 -1
  169. package/template/apps/qpqjs/services/testa/service/src/infrastructure.ts +2 -2
  170. package/template/apps/qpqjs/services/testa/service/src/smoke/config/defineSmokeProbes.ts +16 -0
  171. package/template/apps/qpqjs/services/testa/service/src/smoke/config/index.ts +1 -0
  172. package/template/apps/qpqjs/services/{test/service/src/tick → testa/service/src/smoke}/index.ts +1 -0
  173. package/template/apps/qpqjs/services/testa/service/src/smoke/suites/index.ts +3 -0
  174. package/template/apps/qpqjs/services/testa/service/src/smoke/suites/keyValueStore/config/defineKeyValueStoreSmokeProbe.ts +33 -0
  175. package/template/apps/qpqjs/services/testa/service/src/smoke/suites/keyValueStore/config/index.ts +1 -0
  176. package/template/apps/qpqjs/services/testa/service/src/smoke/suites/keyValueStore/entry/serviceFunction/index.ts +1 -0
  177. package/template/apps/qpqjs/services/testa/service/src/smoke/suites/keyValueStore/logic/index.ts +1 -0
  178. package/template/apps/qpqjs/services/testa/service/src/smoke/suites/signingKey/config/defineSigningKeySmokeProbe.ts +28 -0
  179. package/template/apps/qpqjs/services/testa/service/src/smoke/suites/signingKey/config/index.ts +1 -0
  180. package/template/apps/qpqjs/services/testa/service/src/smoke/suites/signingKey/entry/index.ts +1 -0
  181. package/template/apps/qpqjs/services/testa/service/src/smoke/suites/signingKey/entry/serviceFunction/index.ts +1 -0
  182. package/template/apps/qpqjs/services/testa/service/src/smoke/suites/signingKey/index.ts +3 -0
  183. package/template/apps/qpqjs/services/testa/service/src/smoke/suites/signingKey/logic/index.ts +1 -0
  184. package/template/apps/qpqjs/services/testa/service/src/smoke/suites/storageDrive/config/defineStorageDriveSmokeProbe.ts +31 -0
  185. package/template/apps/qpqjs/services/testa/service/src/smoke/suites/storageDrive/config/index.ts +1 -0
  186. package/template/apps/qpqjs/services/testa/service/src/smoke/suites/storageDrive/entry/index.ts +1 -0
  187. package/template/apps/qpqjs/services/testa/service/src/smoke/suites/storageDrive/entry/serviceFunction/index.ts +1 -0
  188. package/template/apps/qpqjs/services/testa/service/src/smoke/suites/storageDrive/index.ts +3 -0
  189. package/template/apps/qpqjs/services/testa/service/src/smoke/suites/storageDrive/logic/index.ts +1 -0
  190. package/template/docusaurus/docs/actions/core/file/ask-file-write-text-contents.md +1 -1
  191. package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-delete.md +1 -1
  192. package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-get-all.md +1 -1
  193. package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-get.md +1 -1
  194. package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-query.md +3 -1
  195. package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-scan.md +1 -1
  196. package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-update.md +1 -1
  197. package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-upsert.md +1 -1
  198. package/template/docusaurus/docs/actions/core/platform/ask-platform-get-name.md +32 -0
  199. package/template/docusaurus/docs/actions/webserver/email/ask-email-parse.md +54 -0
  200. package/template/docusaurus/docs/config/config-aws/account-email-receiving.md +33 -0
  201. package/template/docusaurus/docs/config/core/crypto-key.md +3 -1
  202. package/template/docusaurus/docs/config/core/key-value-store.md +16 -5
  203. package/template/docusaurus/docs/config/core/storage-drive.md +5 -4
  204. package/template/docusaurus/docs/config/features/event-doc-routes.md +1 -0
  205. package/template/docusaurus/docs/config/features/event-doc.md +22 -1
  206. package/template/docusaurus/docs/config/features/tenant-stores.md +10 -5
  207. package/template/docusaurus/docs/config/features/tenant.md +36 -12
  208. package/template/docusaurus/docs/config/features/tenanted-email-receiver.md +79 -0
  209. package/template/docusaurus/docs/config/features/tenanted-event-doc.md +22 -7
  210. package/template/docusaurus/docs/config/webserver/email-receiver.md +65 -0
  211. package/template/docusaurus/docs/config/webserver/email-receiving-domain.md +41 -0
  212. package/template/scripts/smoke/runSmokeRun.mjs +1 -1
  213. package/template/apps/qpqjs/services/test/service/src/echo/config/defineEcho.ts +0 -9
  214. package/template/apps/qpqjs/services/test/service/src/smoke/constants/smokeProbe.ts +0 -14
  215. package/template/apps/qpqjs/services/test/service/src/smoke/logic/smokeRun/askStartSmokeRun.ts +0 -70
  216. package/template/apps/qpqjs/services/test/service/src/smoke/models/index.ts +0 -5
  217. package/template/apps/qpqjs/services/test/service/src/smoke/queue/index.ts +0 -3
  218. package/template/apps/qpqjs/services/test/service/src/smoke/tests/crossService/index.ts +0 -3
  219. package/template/apps/qpqjs/services/test/service/src/smoke/tests/eventBus/askRunEventBusTest.ts +0 -57
  220. package/template/apps/qpqjs/services/test/service/src/smoke/tests/index.ts +0 -13
  221. package/template/apps/qpqjs/services/test/service/src/smoke/tests/keyValueStore/index.ts +0 -1
  222. package/template/apps/qpqjs/services/test/service/src/smoke/tests/signingKey/index.ts +0 -1
  223. package/template/apps/qpqjs/services/test/service/src/smoke/tests/smokeTestRegistry.ts +0 -54
  224. package/template/apps/qpqjs/services/test/service/src/smoke/tests/storageDrive/index.ts +0 -1
  225. package/template/apps/qpqjs/services/test/service/src/tick/config/index.ts +0 -1
  226. package/template/apps/qpqjs/services/testa/service/src/crossServiceProbe/config/defineCrossServiceProbe.ts +0 -68
  227. package/template/apps/qpqjs/services/testa/service/src/crossServiceProbe/config/index.ts +0 -1
  228. package/template/apps/qpqjs/services/testa/service/src/crossServiceProbe/entry/serviceFunction/index.ts +0 -3
  229. package/template/apps/qpqjs/services/testa/service/src/crossServiceProbe/logic/index.ts +0 -3
  230. package/template/docusaurus/docs/config/config-aws/aws-kms-key.md +0 -100
  231. /package/template/apps/qpqjs/services/test/service/src/smoke/{tests → harness/assert}/askSmokeAssert.ts +0 -0
  232. /package/template/apps/qpqjs/services/test/service/src/smoke/{constants → harness/constants}/SMOKE_RUNS_STORE.ts +0 -0
  233. /package/template/apps/qpqjs/services/test/service/src/smoke/{constants → harness/constants}/githubOidc.ts +0 -0
  234. /package/template/apps/qpqjs/services/test/service/src/smoke/{constants → harness/constants}/smokeRunQueue.ts +0 -0
  235. /package/template/apps/qpqjs/services/test/service/src/smoke/{controller → harness/controller}/askGetSmokeRun.ts +0 -0
  236. /package/template/apps/qpqjs/services/test/service/src/smoke/{controller → harness/controller}/askRunSmokeTests.ts +0 -0
  237. /package/template/apps/qpqjs/services/test/service/src/smoke/{controller → harness/controller}/index.ts +0 -0
  238. /package/template/apps/qpqjs/services/test/service/src/smoke/{data → harness/data}/askGetSmokeRunById.ts +0 -0
  239. /package/template/apps/qpqjs/services/test/service/src/smoke/{data → harness/data}/askRecordSmokeTestResult.ts +0 -0
  240. /package/template/apps/qpqjs/services/test/service/src/smoke/{data → harness/data}/askSaveSmokeRun.ts +0 -0
  241. /package/template/apps/qpqjs/services/test/service/src/smoke/{data → harness/data}/askSetSmokeRunOutcome.ts +0 -0
  242. /package/template/apps/qpqjs/services/test/service/src/smoke/{data → harness/data}/index.ts +0 -0
  243. /package/template/apps/qpqjs/services/test/service/src/smoke/{logic → harness/logic}/github/index.ts +0 -0
  244. /package/template/apps/qpqjs/services/test/service/src/smoke/{logic → harness/logic}/github/verifyGithubOidcToken.ts +0 -0
  245. /package/template/apps/qpqjs/services/test/service/src/smoke/{logic → harness/logic}/index.ts +0 -0
  246. /package/template/apps/qpqjs/services/test/service/src/smoke/{logic → harness/logic}/smokeRun/askFindSmokeRun.ts +0 -0
  247. /package/template/apps/qpqjs/services/test/service/src/smoke/{models → harness/models}/GithubOidcClaims.ts +0 -0
  248. /package/template/apps/qpqjs/services/test/service/src/smoke/{processors → harness/processors}/github/getGithubOidcAuthProcessors.ts +0 -0
  249. /package/template/apps/qpqjs/services/test/service/src/smoke/{processors → harness/processors}/github/index.ts +0 -0
  250. /package/template/apps/qpqjs/services/test/service/src/smoke/{processors → harness/processors}/index.ts +0 -0
  251. /package/template/apps/qpqjs/services/test/service/src/smoke/{queue → harness/queue}/onSmokeTestRequested.ts +0 -0
  252. /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/eventBus → suites/eventBus/logic}/index.ts +0 -0
  253. /package/template/apps/qpqjs/services/test/service/src/smoke/{models → suites/eventBus/models}/SmokeProbeEventQueueEvent.ts +0 -0
  254. /package/template/apps/qpqjs/services/test/service/src/smoke/{eventDoc → suites/eventDoc/definition}/index.ts +0 -0
  255. /package/template/apps/qpqjs/services/test/service/src/smoke/{eventDoc → suites/eventDoc/definition}/smokeProbeDocDefinition.ts +0 -0
  256. /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/eventDoc → suites/eventDoc/logic}/index.ts +0 -0
  257. /package/template/apps/qpqjs/services/test/service/src/smoke/{models → suites/eventDoc/models}/SmokeEventDocAppendQueueEvent.ts +0 -0
  258. /package/template/apps/qpqjs/services/test/service/src/smoke/{models → suites/eventDoc/models}/SmokeEventDocMark.ts +0 -0
  259. /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/noop → suites/noop/logic}/askRunNoopTest.ts +0 -0
  260. /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/noop → suites/noop/logic}/index.ts +0 -0
  261. /package/template/apps/qpqjs/services/test/service/src/{echo → smoke/suites/openApi}/controller/echo.ts +0 -0
  262. /package/template/apps/qpqjs/services/test/service/src/{echo → smoke/suites/openApi}/controller/index.ts +0 -0
  263. /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/openApi → suites/openApi/logic}/index.ts +0 -0
  264. /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/parameter → suites/parameter/logic}/index.ts +0 -0
  265. /package/template/apps/qpqjs/services/test/service/src/{tick → smoke/suites/schedule}/constants/index.ts +0 -0
  266. /package/template/apps/qpqjs/services/test/service/src/{tick → smoke/suites/schedule}/constants/scheduleTickName.ts +0 -0
  267. /package/template/apps/qpqjs/services/test/service/src/{tick → smoke/suites/schedule}/constants/scheduleTickStore.ts +0 -0
  268. /package/template/apps/qpqjs/services/test/service/src/{tick → smoke/suites/schedule}/entry/kvsStream/index.ts +0 -0
  269. /package/template/apps/qpqjs/services/test/service/src/{tick → smoke/suites/schedule}/entry/kvsStream/onScheduleTickStream.ts +0 -0
  270. /package/template/apps/qpqjs/services/test/service/src/{tick → smoke/suites/schedule}/entry/schedule/index.ts +0 -0
  271. /package/template/apps/qpqjs/services/test/service/src/{tick → smoke/suites/schedule}/entry/schedule/onTick.ts +0 -0
  272. /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/schedule → suites/schedule/logic}/index.ts +0 -0
  273. /package/template/apps/qpqjs/services/test/service/src/{tick → smoke/suites/schedule}/models/ScheduleTickRecord.ts +0 -0
  274. /package/template/apps/qpqjs/services/test/service/src/{tick → smoke/suites/schedule}/models/index.ts +0 -0
  275. /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/secret → suites/secret/logic}/index.ts +0 -0
  276. /package/template/apps/qpqjs/services/testa/service/src/{crossServiceProbe → smoke/suites/keyValueStore}/entry/index.ts +0 -0
  277. /package/template/apps/qpqjs/services/testa/service/src/{crossServiceProbe → smoke/suites/keyValueStore}/entry/serviceFunction/smokeCrossServiceKeyValueStoreProbe.ts +0 -0
  278. /package/template/apps/qpqjs/services/testa/service/src/{crossServiceProbe → smoke/suites/keyValueStore}/index.ts +0 -0
  279. /package/template/apps/qpqjs/services/testa/service/src/{crossServiceProbe → smoke/suites/keyValueStore}/logic/askProbeForeignKeyValueStore.ts +0 -0
  280. /package/template/apps/qpqjs/services/testa/service/src/{crossServiceProbe → smoke/suites/signingKey}/entry/serviceFunction/smokeCrossServiceSigningKeyProbe.ts +0 -0
  281. /package/template/apps/qpqjs/services/testa/service/src/{crossServiceProbe → smoke/suites/signingKey}/logic/askProbeForeignSigningKey.ts +0 -0
  282. /package/template/apps/qpqjs/services/testa/service/src/{crossServiceProbe → smoke/suites/storageDrive}/entry/serviceFunction/smokeCrossServiceStorageDriveProbe.ts +0 -0
  283. /package/template/apps/qpqjs/services/testa/service/src/{crossServiceProbe → smoke/suites/storageDrive}/logic/askProbeForeignStorageDrive.ts +0 -0
@@ -12,14 +12,18 @@ export const summarizeSmokeRun = (smokeRun: SmokeRun): SmokeRunWithSummary => {
12
12
  const failed = smokeRun.tests.filter(
13
13
  (t) => t.status === SmokeTestStatus.failed
14
14
  ).length;
15
+ const skipped = smokeRun.tests.filter(
16
+ (t) => t.status === SmokeTestStatus.skipped
17
+ ).length;
15
18
 
16
19
  return {
17
20
  ...smokeRun,
18
21
  summary: {
19
22
  total: smokeRun.tests.length,
20
- completed: passed + failed,
23
+ completed: passed + failed + skipped,
21
24
  passed,
22
25
  failed,
26
+ skipped,
23
27
  },
24
28
  };
25
29
  };
@@ -1,6 +1,6 @@
1
1
  import { QueueEvent, QueueMessage } from 'quidproquo';
2
2
 
3
- // One registered test of one run. `testName` is the registry's stable key,
3
+ // One registered test of one run. `testName` is the test's stable key,
4
4
  // never the positional id.
5
5
  export type SmokeTestRequestedPayload = {
6
6
  runId: string;
@@ -0,0 +1,2 @@
1
+ export * from './GithubOidcClaims';
2
+ export * from './SmokeTestRequestedQueueEvent';
@@ -0,0 +1 @@
1
+ export * from './onSmokeTestRequested';
@@ -0,0 +1,13 @@
1
+ import { QPQConfig } from 'quidproquo';
2
+
3
+ import { SmokeTestDefinition } from './SmokeTestDefinition';
4
+
5
+ /**
6
+ * One folder under suites/: its tests plus the resources and handlers only
7
+ * they use. Tests that share a resource belong in the same suite, so deleting
8
+ * a suite's folder and its line in smokeSuites removes it completely.
9
+ */
10
+ export type SmokeSuite = {
11
+ tests: SmokeTestDefinition[];
12
+ defineConfig?: () => QPQConfig;
13
+ };
@@ -11,4 +11,7 @@ import { AskResponse } from 'quidproquo';
11
11
  export type SmokeTestDefinition = {
12
12
  name: string;
13
13
  askRun: (runId: string) => AskResponse<void>;
14
+ // The test exercises something only a deployed platform has (inbound email,
15
+ // say). On the dev server it is recorded as skipped and never queued.
16
+ deployedOnly?: boolean;
14
17
  };
@@ -0,0 +1,2 @@
1
+ export * from './SmokeSuite';
2
+ export * from './SmokeTestDefinition';
@@ -1,10 +1,3 @@
1
1
  export * from './config';
2
- export * from './constants';
3
- export * from './controller';
4
- export * from './data';
5
- export * from './eventDoc';
6
- export * from './logic';
7
- export * from './models';
8
- export * from './processors';
9
- export * from './queue';
10
- export * from './tests';
2
+ export * from './harness';
3
+ export * from './suites';
@@ -0,0 +1,20 @@
1
+ import { defineEmailReceiver, defineEmailSender, QPQConfig } from 'quidproquo';
2
+
3
+ import { SMOKE_EMAIL_RECEIVER } from '../constants/SMOKE_EMAIL_RECEIVER';
4
+
5
+ /**
6
+ * The test sends to its own receiving domain, the receiver hands the parsed
7
+ * message to onSmokeEmailReceived, which writes a marker into the probe store,
8
+ * and the test polls for it. The sender is what lets the test send; the
9
+ * receiving domain is a verified identity, so the SES sandbox allows it.
10
+ */
11
+ export const defineEmailReceiveSmoke = (): QPQConfig => [
12
+ defineEmailSender(),
13
+ defineEmailReceiver(SMOKE_EMAIL_RECEIVER, {
14
+ onEmail: {
15
+ basePath: __dirname,
16
+ relativePath: '../entry/email/onSmokeEmailReceived',
17
+ functionName: 'onSmokeEmailReceived',
18
+ },
19
+ }),
20
+ ];
@@ -0,0 +1 @@
1
+ export * from './defineEmailReceiveSmoke';
@@ -0,0 +1,2 @@
1
+ /** The inbound email receiver; its onEmail writes the marker the email test polls for. */
2
+ export const SMOKE_EMAIL_RECEIVER = 'smoke';
@@ -0,0 +1 @@
1
+ export * from './SMOKE_EMAIL_RECEIVER';
@@ -0,0 +1,15 @@
1
+ import { SmokeSuite } from '../../harness/types/SmokeSuite';
2
+ import { defineEmailReceiveSmoke } from './config/defineEmailReceiveSmoke';
3
+ import { askRunEmailReceiveTest } from './logic/askRunEmailReceiveTest';
4
+
5
+ /** Inbound email to our own receiving domain. Deployed only. */
6
+ export const emailReceiveSmokeSuite: SmokeSuite = {
7
+ defineConfig: defineEmailReceiveSmoke,
8
+ tests: [
9
+ {
10
+ name: 'emailReceive',
11
+ askRun: askRunEmailReceiveTest,
12
+ deployedOnly: true,
13
+ },
14
+ ],
15
+ };
@@ -0,0 +1 @@
1
+ export * from './onSmokeEmailReceived';
@@ -0,0 +1,33 @@
1
+ import {
2
+ askKeyValueStoreUpsert,
3
+ AskResponse,
4
+ EmailReceivedEvent,
5
+ EmailReceivedEventResponse,
6
+ } from 'quidproquo';
7
+
8
+ import { SMOKE_PROBE_STORE } from '@qpqjs/constants';
9
+ import { SmokeProbeRecord } from '@qpqjs/test-models';
10
+
11
+ import { smokeEmailMarkerId } from '../../logic/smokeEmailMarkerId';
12
+
13
+ // The smoke receiver's onEmail: one marker per delivered recipient, carrying
14
+ // the subject and the provider's SPF/DKIM verdicts so the test can check the
15
+ // message came through intact and authenticated.
16
+ export function* onSmokeEmailReceived({
17
+ message,
18
+ }: EmailReceivedEvent): AskResponse<EmailReceivedEventResponse> {
19
+ for (const recipient of message.recipients) {
20
+ const marker: SmokeProbeRecord = {
21
+ probeId: smokeEmailMarkerId(recipient),
22
+ category: 'email',
23
+ value: 1,
24
+ path: message.subject,
25
+ authentication: [
26
+ message.authentication.spf,
27
+ message.authentication.dkim,
28
+ ].join('/'),
29
+ };
30
+
31
+ yield* askKeyValueStoreUpsert<SmokeProbeRecord>(SMOKE_PROBE_STORE, marker);
32
+ }
33
+ }
@@ -0,0 +1,5 @@
1
+ export * from './config';
2
+ export * from './constants';
3
+ export * from './emailReceiveSmokeSuite';
4
+ export * from './entry';
5
+ export * from './logic';
@@ -0,0 +1,41 @@
1
+ import { askDnsResolveHosts, askEmailSendEmail, AskResponse } from 'quidproquo';
2
+
3
+ import { askSmokeAssert } from '../../../harness/assert/askSmokeAssert';
4
+ import { askSmokePollForMarker } from '../../../harness/assert/askSmokePollForMarker';
5
+ import { smokeEmailMarkerId } from './smokeEmailMarkerId';
6
+
7
+ // The inbound email path end to end: send to this app's own receiving domain
8
+ // with its own sender, SES receives it through the account rule set and the
9
+ // app's rule, the receiver parses it and hands it to onSmokeEmailReceived,
10
+ // which writes the marker. Deployed only: nothing receives mail locally.
11
+ export function* askRunEmailReceiveTest(runId: string): AskResponse<void> {
12
+ const [receivingHost] = yield* askDnsResolveHosts({ subdomain: 'inbox' });
13
+ const [siteHost] = yield* askDnsResolveHosts();
14
+
15
+ const recipient = `${runId}@${receivingHost}`;
16
+ const subject = `smoke ${runId}`;
17
+
18
+ yield* askEmailSendEmail({
19
+ from: `smoke@${siteHost}`,
20
+ to: [recipient],
21
+ subject,
22
+ bodyText: `smoke probe ${runId}`,
23
+ });
24
+
25
+ // Mail delivery is the slowest path in the suite: SES receives, scans and
26
+ // writes to S3 before the drive event fires.
27
+ const marker = yield* askSmokePollForMarker(
28
+ smokeEmailMarkerId(recipient),
29
+ 'the inbound email path',
30
+ 45
31
+ );
32
+
33
+ yield* askSmokeAssert(
34
+ marker.path === subject,
35
+ `received subject [${marker.path}] did not match [${subject}]`
36
+ );
37
+ yield* askSmokeAssert(
38
+ marker.authentication === 'pass/pass',
39
+ `received message was not authenticated: spf/dkim [${marker.authentication}]`
40
+ );
41
+ }
@@ -0,0 +1,2 @@
1
+ export * from './askRunEmailReceiveTest';
2
+ export * from './smokeEmailMarkerId';
@@ -0,0 +1,4 @@
1
+ // The marker row id for one received message: the recipient's local part, which the email
2
+ // test sets to its own run id so the marker it polls for is provably its own.
3
+ export const smokeEmailMarkerId = (recipient: string): string =>
4
+ `email-${recipient.split('@')[0]}`;
@@ -0,0 +1,29 @@
1
+ import {
2
+ defineCryptoKey,
3
+ defineKeyValueStore,
4
+ defineStorageDrive,
5
+ QPQConfig,
6
+ } from 'quidproquo';
7
+
8
+ import { SmokeProbeRecord } from '@qpqjs/test-models';
9
+
10
+ import { SMOKE_CRYPTO_KEY } from '../constants/SMOKE_CRYPTO_KEY';
11
+ import { SMOKE_ENCRYPTED_PROBE_DRIVE } from '../constants/SMOKE_ENCRYPTED_PROBE_DRIVE';
12
+ import { SMOKE_ENCRYPTED_PROBE_STORE } from '../constants/SMOKE_ENCRYPTED_PROBE_STORE';
13
+
14
+ /**
15
+ * A drive and a store encrypted with an owned crypto key, so the test proves
16
+ * the role's KMS grant covers data at rest.
17
+ */
18
+ export const defineEncryptedResourcesSmoke = (): QPQConfig => [
19
+ defineCryptoKey(SMOKE_CRYPTO_KEY),
20
+ defineKeyValueStore<SmokeProbeRecord>(
21
+ SMOKE_ENCRYPTED_PROBE_STORE,
22
+ 'probeId',
23
+ [],
24
+ { cryptoKeyName: SMOKE_CRYPTO_KEY }
25
+ ),
26
+ defineStorageDrive(SMOKE_ENCRYPTED_PROBE_DRIVE, {
27
+ cryptoKeyName: SMOKE_CRYPTO_KEY,
28
+ }),
29
+ ];
@@ -0,0 +1 @@
1
+ export * from './defineEncryptedResourcesSmoke';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The crypto key the encrypted probe drive and store name. Not 'smokeProbe':
3
+ * the signing key of that name is a KMS alias too, and the two would collide.
4
+ */
5
+ export const SMOKE_CRYPTO_KEY = 'smokeCrypto';
@@ -0,0 +1,2 @@
1
+ /** A probe drive encrypted at rest with SMOKE_CRYPTO_KEY. */
2
+ export const SMOKE_ENCRYPTED_PROBE_DRIVE = 'smoke-encrypted-probe';
@@ -0,0 +1,2 @@
1
+ /** A probe store encrypted at rest with SMOKE_CRYPTO_KEY. */
2
+ export const SMOKE_ENCRYPTED_PROBE_STORE = 'smokeEncryptedProbe';
@@ -0,0 +1,3 @@
1
+ export * from './SMOKE_CRYPTO_KEY';
2
+ export * from './SMOKE_ENCRYPTED_PROBE_DRIVE';
3
+ export * from './SMOKE_ENCRYPTED_PROBE_STORE';
@@ -0,0 +1,9 @@
1
+ import { SmokeSuite } from '../../harness/types/SmokeSuite';
2
+ import { defineEncryptedResourcesSmoke } from './config/defineEncryptedResourcesSmoke';
3
+ import { askRunEncryptedResourcesTest } from './logic/askRunEncryptedResourcesTest';
4
+
5
+ /** Round trips through a drive and a store encrypted with an owned crypto key. */
6
+ export const encryptedResourcesSmokeSuite: SmokeSuite = {
7
+ defineConfig: defineEncryptedResourcesSmoke,
8
+ tests: [{ name: 'encryptedResources', askRun: askRunEncryptedResourcesTest }],
9
+ };
@@ -0,0 +1,4 @@
1
+ export * from './config';
2
+ export * from './constants';
3
+ export * from './encryptedResourcesSmokeSuite';
4
+ export * from './logic';
@@ -0,0 +1,61 @@
1
+ import {
2
+ askFileDelete,
3
+ askFileReadTextContents,
4
+ askFileWriteTextContents,
5
+ askKeyValueStoreDelete,
6
+ askKeyValueStoreGet,
7
+ askKeyValueStoreUpsert,
8
+ askNewGuid,
9
+ AskResponse,
10
+ } from 'quidproquo';
11
+
12
+ import { SmokeProbeRecord } from '@qpqjs/test-models';
13
+
14
+ import { askSmokeAssert } from '../../../harness/assert/askSmokeAssert';
15
+ import { SMOKE_ENCRYPTED_PROBE_DRIVE } from '../constants/SMOKE_ENCRYPTED_PROBE_DRIVE';
16
+ import { SMOKE_ENCRYPTED_PROBE_STORE } from '../constants/SMOKE_ENCRYPTED_PROBE_STORE';
17
+
18
+ // A drive and a store encrypted with a defineCryptoKey. Deployed, every write
19
+ // needs kms:GenerateDataKey and every read kms:Decrypt on that key through
20
+ // the alias-conditioned grant, so a plain round trip on each is the proof.
21
+ // Locally there is no encryption at rest and this is a plain round trip.
22
+ export function* askRunEncryptedResourcesTest(): AskResponse<void> {
23
+ const probeId = yield* askNewGuid();
24
+
25
+ const record: SmokeProbeRecord = { probeId, category: 'encrypted', value: 1 };
26
+ yield* askKeyValueStoreUpsert<SmokeProbeRecord>(
27
+ SMOKE_ENCRYPTED_PROBE_STORE,
28
+ record
29
+ );
30
+
31
+ const written = yield* askKeyValueStoreGet<SmokeProbeRecord>(
32
+ SMOKE_ENCRYPTED_PROBE_STORE,
33
+ probeId
34
+ );
35
+ yield* askSmokeAssert(
36
+ written?.value === 1,
37
+ 'get after upsert on the encrypted store did not return the record'
38
+ );
39
+
40
+ yield* askKeyValueStoreDelete(SMOKE_ENCRYPTED_PROBE_STORE, probeId);
41
+
42
+ const filepath = `encrypted/${probeId}.txt`;
43
+ const contents = `encrypted smoke probe ${probeId}`;
44
+
45
+ yield* askFileWriteTextContents(
46
+ SMOKE_ENCRYPTED_PROBE_DRIVE,
47
+ filepath,
48
+ contents
49
+ );
50
+
51
+ const readBack = yield* askFileReadTextContents(
52
+ SMOKE_ENCRYPTED_PROBE_DRIVE,
53
+ filepath
54
+ );
55
+ yield* askSmokeAssert(
56
+ readBack === contents,
57
+ 'file on the encrypted drive did not read back as written'
58
+ );
59
+
60
+ yield* askFileDelete(SMOKE_ENCRYPTED_PROBE_DRIVE, [filepath]);
61
+ }
@@ -0,0 +1 @@
1
+ export * from './askRunEncryptedResourcesTest';
@@ -0,0 +1,21 @@
1
+ import { defineEventBus, defineQueue, QPQConfig } from 'quidproquo';
2
+
3
+ import { SMOKE_PROBE_EVENT_BUS } from '../constants/SMOKE_PROBE_EVENT_BUS';
4
+ import { SMOKE_PROBE_EVENT_QUEUE } from '../constants/SMOKE_PROBE_EVENT_QUEUE';
5
+ import { SMOKE_PROBE_EVENT_TYPE } from '../constants/SMOKE_PROBE_EVENT_TYPE';
6
+
7
+ /** Publish to the bus, the subscribed queue's entry writes a marker into the probe store, the test polls for it. */
8
+ export const defineEventBusSmoke = (): QPQConfig => [
9
+ defineEventBus(SMOKE_PROBE_EVENT_BUS),
10
+ defineQueue(
11
+ SMOKE_PROBE_EVENT_QUEUE,
12
+ {
13
+ [SMOKE_PROBE_EVENT_TYPE]: {
14
+ basePath: __dirname,
15
+ relativePath: '../entry/queue/onSmokeProbeEvent',
16
+ functionName: 'onSmokeProbeEvent',
17
+ },
18
+ },
19
+ { eventBusSubscriptions: [SMOKE_PROBE_EVENT_BUS] }
20
+ ),
21
+ ];
@@ -0,0 +1 @@
1
+ export * from './defineEventBusSmoke';
@@ -0,0 +1,2 @@
1
+ /** The owned event bus the eventBus test publishes to. */
2
+ export const SMOKE_PROBE_EVENT_BUS = 'smokeProbe';
@@ -0,0 +1,2 @@
1
+ /** The queue subscribed to the probe event bus; its entry writes the marker the test polls for. */
2
+ export const SMOKE_PROBE_EVENT_QUEUE = 'smokeProbeEvents';
@@ -0,0 +1,2 @@
1
+ /** The one message type that flows bus -> queue -> store marker. */
2
+ export const SMOKE_PROBE_EVENT_TYPE = 'smokeProbeEvent';
@@ -0,0 +1,3 @@
1
+ export * from './SMOKE_PROBE_EVENT_BUS';
2
+ export * from './SMOKE_PROBE_EVENT_QUEUE';
3
+ export * from './SMOKE_PROBE_EVENT_TYPE';
@@ -0,0 +1 @@
1
+ export * from './onSmokeProbeEvent';
@@ -7,7 +7,7 @@ import {
7
7
  import { SMOKE_PROBE_STORE } from '@qpqjs/constants';
8
8
  import { SmokeProbeRecord } from '@qpqjs/test-models';
9
9
 
10
- import { SmokeProbeEventQueueEvent } from '../models/SmokeProbeEventQueueEvent';
10
+ import { SmokeProbeEventQueueEvent } from '../../models/SmokeProbeEventQueueEvent';
11
11
 
12
12
  // Fan-in for the event bus test: the message published to the probe bus
13
13
  // lands here via the subscribed queue, and the marker row it writes is what
@@ -0,0 +1,9 @@
1
+ import { SmokeSuite } from '../../harness/types/SmokeSuite';
2
+ import { defineEventBusSmoke } from './config/defineEventBusSmoke';
3
+ import { askRunEventBusTest } from './logic/askRunEventBusTest';
4
+
5
+ /** Publish to an owned event bus and wait for the subscribed queue's marker. */
6
+ export const eventBusSmokeSuite: SmokeSuite = {
7
+ defineConfig: defineEventBusSmoke,
8
+ tests: [{ name: 'eventBus', askRun: askRunEventBusTest }],
9
+ };
@@ -0,0 +1,6 @@
1
+ export * from './config';
2
+ export * from './constants';
3
+ export * from './entry';
4
+ export * from './eventBusSmokeSuite';
5
+ export * from './logic';
6
+ export * from './models';
@@ -0,0 +1,31 @@
1
+ import {
2
+ askEventBusSendMessages,
3
+ askNewGuid,
4
+ AskResponse,
5
+ EventBusMessage,
6
+ } from 'quidproquo';
7
+
8
+ import { askSmokePollForMarker } from '../../../harness/assert/askSmokePollForMarker';
9
+ import { SMOKE_PROBE_EVENT_BUS } from '../constants/SMOKE_PROBE_EVENT_BUS';
10
+ import { SMOKE_PROBE_EVENT_TYPE } from '../constants/SMOKE_PROBE_EVENT_TYPE';
11
+ import { SmokeProbeEventPayload } from '../models/SmokeProbeEventQueueEvent';
12
+
13
+ // The full async fan-out / fan-in path: publish to the owned event bus, the
14
+ // subscribed queue's entry (onSmokeProbeEvent) writes a marker row, and this
15
+ // polls the store for it. Covers sns:Publish, the bus -> queue subscription,
16
+ // and the queue lambda's own store access, in one round trip.
17
+ export function* askRunEventBusTest(): AskResponse<void> {
18
+ const markerId = yield* askNewGuid();
19
+
20
+ const message: EventBusMessage<SmokeProbeEventPayload> = {
21
+ type: SMOKE_PROBE_EVENT_TYPE,
22
+ payload: { markerId },
23
+ };
24
+
25
+ yield* askEventBusSendMessages<SmokeProbeEventPayload>({
26
+ eventBusName: SMOKE_PROBE_EVENT_BUS,
27
+ eventBusMessages: [message],
28
+ });
29
+
30
+ yield* askSmokePollForMarker(markerId, 'the event bus and queue');
31
+ }
@@ -0,0 +1 @@
1
+ export * from './SmokeProbeEventQueueEvent';
@@ -0,0 +1,44 @@
1
+ import { defineQueue, QPQConfig } from 'quidproquo';
2
+ import { defineEventDoc } from 'quidproquo-features';
3
+
4
+ import {
5
+ SMOKE_EVENT_DOC_APPEND_MESSAGE_TYPE,
6
+ SMOKE_EVENT_DOC_APPEND_QUEUE,
7
+ SMOKE_EVENT_DOC_BASE_PATH,
8
+ } from '../constants/smokeEventDoc';
9
+ import { smokeProbeDocDefinition } from '../definition/smokeProbeDocDefinition';
10
+
11
+ /**
12
+ * A full registered event-doc collection (stores, stream projector, dynamic
13
+ * functions, routes) so the tests exercise event docs the way a real service
14
+ * does, plus the queue that fans a test's writers out one invocation each so
15
+ * their appends race across lambdas.
16
+ */
17
+ export const defineEventDocSmoke = (): QPQConfig => [
18
+ // NOTE the routes mount with no auth (the test service has no user
19
+ // directory), so the collection is world-writable; it holds nothing but
20
+ // throwaway probe docs.
21
+ defineEventDoc(
22
+ smokeProbeDocDefinition,
23
+ {
24
+ basePath: __dirname,
25
+ relativePath: '../definition/smokeProbeDocDefinition',
26
+ functionName: 'smokeProbeDocDefinition',
27
+ },
28
+ { basePath: SMOKE_EVENT_DOC_BASE_PATH }
29
+ ),
30
+ // A writer that loses the slot race past the append retry cap fails its
31
+ // message; a quick redelivery lets it land instead of vanishing, as a
32
+ // production queue should.
33
+ defineQueue(
34
+ SMOKE_EVENT_DOC_APPEND_QUEUE,
35
+ {
36
+ [SMOKE_EVENT_DOC_APPEND_MESSAGE_TYPE]: {
37
+ basePath: __dirname,
38
+ relativePath: '../entry/queue/onSmokeEventDocAppend',
39
+ functionName: 'onSmokeEventDocAppend',
40
+ },
41
+ },
42
+ { maxTries: 3, ttRetryInSeconds: 10 }
43
+ ),
44
+ ];
@@ -0,0 +1 @@
1
+ export * from './defineEventDocSmoke';
@@ -1,7 +1,7 @@
1
1
  import { EventDocEventActor, EventDocStoreOptions } from 'quidproquo-features';
2
2
 
3
3
  // The throwaway event-doc collection the smoke tests write to, registered in full via
4
- // defineEventDoc (see ../eventDoc/smokeProbeDocDefinition): stores, stream projector,
4
+ // defineEventDoc (see ../definition/smokeProbeDocDefinition): stores, stream projector,
5
5
  // dynamic functions and routes, exactly as a real service's collection.
6
6
  export const SMOKE_EVENT_DOC_STORE = 'smokeEventDocs';
7
7
  export const SMOKE_EVENT_DOC_TYPE = 'smokeProbeDoc';
@@ -0,0 +1 @@
1
+ export * from './onSmokeEventDocAppend';
@@ -11,9 +11,9 @@ import {
11
11
  SMOKE_EVENT_DOC_MARK_EVENT,
12
12
  SMOKE_EVENT_DOC_SCHEMA_VERSION,
13
13
  SMOKE_EVENT_DOC_STORE_OPTIONS,
14
- } from '../constants/smokeEventDoc';
15
- import { SmokeEventDocAppendQueueEvent } from '../models/SmokeEventDocAppendQueueEvent';
16
- import { SmokeEventDocMark } from '../models/SmokeEventDocMark';
14
+ } from '../../constants/smokeEventDoc';
15
+ import { SmokeEventDocAppendQueueEvent } from '../../models/SmokeEventDocAppendQueueEvent';
16
+ import { SmokeEventDocMark } from '../../models/SmokeEventDocMark';
17
17
 
18
18
  // One writer in the event-doc concurrency tests. Every message is its own invocation,
19
19
  // so the writers of a test race each other for the log's next slots for real - the
@@ -0,0 +1,19 @@
1
+ import { SmokeSuite } from '../../harness/types/SmokeSuite';
2
+ import { defineEventDocSmoke } from './config/defineEventDocSmoke';
3
+ import { askRunEventDocConcurrentAppendTest } from './logic/askRunEventDocConcurrentAppendTest';
4
+ import { askRunEventDocInterleavedBatchAppendTest } from './logic/askRunEventDocInterleavedBatchAppendTest';
5
+
6
+ /** Racing appends onto one event doc across lambdas must stay contiguous. */
7
+ export const eventDocSmokeSuite: SmokeSuite = {
8
+ defineConfig: defineEventDocSmoke,
9
+ tests: [
10
+ {
11
+ name: 'eventDocConcurrentAppend',
12
+ askRun: askRunEventDocConcurrentAppendTest,
13
+ },
14
+ {
15
+ name: 'eventDocInterleavedBatchAppend',
16
+ askRun: askRunEventDocInterleavedBatchAppendTest,
17
+ },
18
+ ],
19
+ };
@@ -0,0 +1,7 @@
1
+ export * from './config';
2
+ export * from './constants';
3
+ export * from './definition';
4
+ export * from './entry';
5
+ export * from './eventDocSmokeSuite';
6
+ export * from './logic';
7
+ export * from './models';
@@ -1,7 +1,7 @@
1
1
  import { AskResponse } from 'quidproquo';
2
2
  import { EventDocEvent } from 'quidproquo-features';
3
3
 
4
- import { askSmokeAssert } from '../askSmokeAssert';
4
+ import { askSmokeAssert } from '../../../harness/assert/askSmokeAssert';
5
5
 
6
6
  // The whole point of numeric event ids: an ascending list read of the log is exactly
7
7
  // 0, 1, 2, ... with no hole and no repeat, whatever order the writers raced in.
@@ -1,8 +1,8 @@
1
1
  import { AskResponse } from 'quidproquo';
2
2
  import { askEventDocDocumentStateLatest } from 'quidproquo-features';
3
3
 
4
- import { SmokeProbeDocState } from '../../eventDoc/smokeProbeDocDefinition';
5
- import { askSmokeAssert } from '../askSmokeAssert';
4
+ import { askSmokeAssert } from '../../../harness/assert/askSmokeAssert';
5
+ import { SmokeProbeDocState } from '../definition/smokeProbeDocDefinition';
6
6
 
7
7
  // The folded document, read the way the render/references routes read it: snapshot
8
8
  // seeded (whatever the stream projector has stored so far) plus the gap, through the
@@ -1,9 +1,10 @@
1
1
  import { askDelay, AskResponse } from 'quidproquo';
2
2
  import { askEventDocEventListAll, EventDocEvent } from 'quidproquo-features';
3
3
 
4
- import { askSmokeAssert } from '../askSmokeAssert';
4
+ import { askSmokeAssert } from '../../../harness/assert/askSmokeAssert';
5
5
 
6
- const POLL_ATTEMPTS = 20;
6
+ // Long enough to cover a writer's retry laps plus one queue redelivery.
7
+ const POLL_ATTEMPTS = 45;
7
8
  const POLL_INTERVAL_MS = 2000;
8
9
 
9
10
  // Poll a probe doc's log until it holds `expectedLength` events (INIT_STATE included),