create-qpq-app 0.1.26 → 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.
- package/package.json +2 -2
- package/template/apps/qpqjs/services/test/models/src/SmokeProbeRecord.ts +3 -0
- package/template/apps/qpqjs/services/test/service/src/infrastructure.ts +0 -6
- package/template/apps/qpqjs/services/test/service/src/smoke/config/defineSmoke.ts +8 -264
- package/template/apps/qpqjs/services/test/service/src/smoke/harness/assert/index.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/harness/config/defineSmokeHarness.ts +115 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/harness/config/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{constants → harness/constants}/index.ts +0 -2
- package/template/apps/qpqjs/services/test/service/src/smoke/harness/index.ts +10 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{logic → harness/logic}/smokeRun/askExecuteSmokeTest.ts +3 -3
- package/template/apps/qpqjs/services/test/service/src/smoke/{logic → harness/logic}/smokeRun/askStartSmokeRun.ts +5 -4
- package/template/apps/qpqjs/services/test/service/src/smoke/{logic → harness/logic}/smokeRun/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/harness/logic/smokeRun/listSmokeTests.ts +6 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{models → harness/models}/SmokeTestRequestedQueueEvent.ts +1 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/harness/models/index.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/harness/queue/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/harness/types/SmokeSuite.ts +13 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/harness/types/index.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/index.ts +2 -12
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/config/defineEmailReceiveSmoke.ts +20 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/config/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/constants/SMOKE_EMAIL_RECEIVER.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/constants/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/emailReceiveSmokeSuite.ts +15 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{email → suites/emailReceive/entry/email}/index.ts +0 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/{email → suites/emailReceive/entry/email}/onSmokeEmailReceived.ts +1 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/entry/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/emailReceive/index.ts +5 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/emailReceive → suites/emailReceive/logic}/askRunEmailReceiveTest.ts +3 -3
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/emailReceive → suites/emailReceive/logic}/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/encryptedResources/config/defineEncryptedResourcesSmoke.ts +29 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/encryptedResources/config/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/encryptedResources/constants/SMOKE_CRYPTO_KEY.ts +5 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/encryptedResources/constants/SMOKE_ENCRYPTED_PROBE_DRIVE.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/encryptedResources/constants/SMOKE_ENCRYPTED_PROBE_STORE.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/encryptedResources/constants/index.ts +3 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/encryptedResources/encryptedResourcesSmokeSuite.ts +9 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/encryptedResources/index.ts +4 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/encryptedResources → suites/encryptedResources/logic}/askRunEncryptedResourcesTest.ts +3 -5
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/config/defineEventBusSmoke.ts +21 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/config/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/constants/SMOKE_PROBE_EVENT_BUS.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/constants/SMOKE_PROBE_EVENT_QUEUE.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/constants/SMOKE_PROBE_EVENT_TYPE.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/constants/index.ts +3 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/entry/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/entry/queue/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{queue → suites/eventBus/entry/queue}/onSmokeProbeEvent.ts +1 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/eventBusSmokeSuite.ts +9 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/index.ts +6 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/eventBus → suites/eventBus/logic}/askRunEventBusTest.ts +4 -6
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventBus/models/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventDoc/config/defineEventDocSmoke.ts +44 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventDoc/config/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventDoc/constants/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{constants → suites/eventDoc/constants}/smokeEventDoc.ts +1 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventDoc/entry/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventDoc/entry/queue/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{queue → suites/eventDoc/entry/queue}/onSmokeEventDocAppend.ts +3 -3
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventDoc/eventDocSmokeSuite.ts +19 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventDoc/index.ts +7 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/eventDoc → suites/eventDoc/logic}/askAssertContiguousEventIds.ts +1 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/eventDoc → suites/eventDoc/logic}/askAssertSmokeProbeDocState.ts +2 -2
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/eventDoc → suites/eventDoc/logic}/askAwaitSmokeEventDocLog.ts +1 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/eventDoc → suites/eventDoc/logic}/askRunEventDocConcurrentAppendTest.ts +5 -5
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/eventDoc → suites/eventDoc/logic}/askRunEventDocInterleavedBatchAppendTest.ts +4 -4
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/eventDoc/models/index.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests → suites}/index.ts +4 -5
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStore/index.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStore/keyValueStoreSmokeSuite.ts +14 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/crossService → suites/keyValueStore/logic}/askRunCrossServiceKeyValueStoreTest.ts +1 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/keyValueStore → suites/keyValueStore/logic}/askRunKeyValueStoreTest.ts +1 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStore/logic/index.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/config/defineKeyValueStoreStreamSmoke.ts +30 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/config/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/constants/SMOKE_STREAM_PROBE_STORE.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/constants/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/entry/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{kvsStream → suites/keyValueStoreStream/entry/kvsStream}/index.ts +0 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/{kvsStream → suites/keyValueStoreStream/entry/kvsStream}/onSmokeStreamRecord.ts +6 -4
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/index.ts +5 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/keyValueStoreStream/keyValueStoreStreamSmokeSuite.ts +11 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/keyValueStoreStream → suites/keyValueStoreStream/logic}/askRunKeyValueStoreStreamTest.ts +15 -6
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/keyValueStoreStream → suites/keyValueStoreStream/logic}/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/noop/index.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/noop/noopSmokeSuite.ts +7 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/openApi/config/defineOpenApiSmoke.ts +13 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/openApi/config/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/openApi/index.ts +4 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/openApi → suites/openApi/logic}/askRunEchoRoundTripTest.ts +1 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/openApi → suites/openApi/logic}/askRunOpenApiDocumentTest.ts +1 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/openApi/openApiSmokeSuite.ts +13 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/parameter/config/defineParameterSmoke.ts +11 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/parameter/config/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/parameter/constants/SMOKE_PROBE_PARAMETER.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/parameter/constants/SMOKE_PROBE_PARAMETER_VALUE.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/parameter/constants/index.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/parameter/index.ts +4 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/parameter → suites/parameter/logic}/askRunParameterTest.ts +3 -5
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/parameter/parameterSmokeSuite.ts +9 -0
- package/template/apps/qpqjs/services/test/service/src/{tick/config/defineTick.ts → smoke/suites/schedule/config/defineScheduleSmoke.ts} +1 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/schedule/config/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/schedule/entry/index.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/schedule/index.ts +6 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/schedule → suites/schedule/logic}/askRunScheduleTest.ts +4 -4
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/schedule/scheduleSmokeSuite.ts +9 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedKeyValueStore/config/defineScopedKeyValueStoreSmoke.ts +19 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedKeyValueStore/config/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedKeyValueStore/constants/SMOKE_SCOPED_PROBE_STORE.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedKeyValueStore/constants/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedKeyValueStore/index.ts +4 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedKeyValueStore/logic/askRunScopedKeyValueStoreTest.ts +256 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedKeyValueStore/scopedKeyValueStoreSmokeSuite.ts +11 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedStorageDrive/config/defineScopedStorageDriveSmoke.ts +12 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedStorageDrive/config/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedStorageDrive/constants/SMOKE_SCOPED_PROBE_DRIVE.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedStorageDrive/constants/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedStorageDrive/index.ts +4 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/scopedStorageDrive → suites/scopedStorageDrive/logic}/askRunScopedStorageDriveTest.ts +2 -2
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/scopedStorageDrive/scopedStorageDriveSmokeSuite.ts +9 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/secret/config/defineSecretSmoke.ts +8 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/secret/config/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/secret/constants/SMOKE_PROBE_SECRET.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/secret/constants/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/secret/index.ts +4 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/secret → suites/secret/logic}/askRunSecretTest.ts +2 -2
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/secret/secretSmokeSuite.ts +9 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/signingKey/config/defineSigningKeySmoke.ts +12 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/signingKey/config/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/signingKey/index.ts +3 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/crossService → suites/signingKey/logic}/askRunCrossServiceSigningKeyTest.ts +1 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/signingKey → suites/signingKey/logic}/askRunSigningKeyTest.ts +1 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/signingKey/logic/index.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/signingKey/signingKeySmokeSuite.ts +16 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/smokeSuites.ts +46 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDrive/index.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/crossService → suites/storageDrive/logic}/askRunCrossServiceStorageDriveTest.ts +1 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/storageDrive → suites/storageDrive/logic}/askRunStorageDriveTest.ts +1 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDrive/logic/index.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDrive/storageDriveSmokeSuite.ts +14 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/config/defineStorageDriveEventSmoke.ts +27 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/config/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/constants/SMOKE_FILE_EVENT_DRIVE.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/constants/SMOKE_SCOPED_FILE_EVENT_DRIVE.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/constants/index.ts +2 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/entry/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/entry/storageDrive/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{storageDrive → suites/storageDriveEvent/entry/storageDrive}/onSmokeFileEvent.ts +1 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/index.ts +5 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/storageDriveEvent → suites/storageDriveEvent/logic}/askRunStorageDriveEventTest.ts +7 -9
- package/template/apps/qpqjs/services/test/service/src/smoke/{tests/storageDriveEvent → suites/storageDriveEvent/logic}/index.ts +1 -0
- package/template/apps/qpqjs/services/test/service/src/smoke/suites/storageDriveEvent/storageDriveEventSmokeSuite.ts +9 -0
- package/template/apps/qpqjs/services/testa/models/src/CrossServiceProbePayload.ts +1 -1
- package/template/apps/qpqjs/services/testa/service/src/infrastructure.ts +2 -2
- package/template/apps/qpqjs/services/testa/service/src/smoke/config/defineSmokeProbes.ts +16 -0
- package/template/apps/qpqjs/services/testa/service/src/smoke/config/index.ts +1 -0
- package/template/apps/qpqjs/services/{test/service/src/tick → testa/service/src/smoke}/index.ts +1 -0
- package/template/apps/qpqjs/services/testa/service/src/smoke/suites/index.ts +3 -0
- package/template/apps/qpqjs/services/testa/service/src/smoke/suites/keyValueStore/config/defineKeyValueStoreSmokeProbe.ts +33 -0
- package/template/apps/qpqjs/services/testa/service/src/smoke/suites/keyValueStore/config/index.ts +1 -0
- package/template/apps/qpqjs/services/testa/service/src/smoke/suites/keyValueStore/entry/serviceFunction/index.ts +1 -0
- package/template/apps/qpqjs/services/testa/service/src/smoke/suites/keyValueStore/logic/index.ts +1 -0
- package/template/apps/qpqjs/services/testa/service/src/smoke/suites/signingKey/config/defineSigningKeySmokeProbe.ts +28 -0
- package/template/apps/qpqjs/services/testa/service/src/smoke/suites/signingKey/config/index.ts +1 -0
- package/template/apps/qpqjs/services/testa/service/src/smoke/suites/signingKey/entry/index.ts +1 -0
- package/template/apps/qpqjs/services/testa/service/src/smoke/suites/signingKey/entry/serviceFunction/index.ts +1 -0
- package/template/apps/qpqjs/services/testa/service/src/smoke/suites/signingKey/index.ts +3 -0
- package/template/apps/qpqjs/services/testa/service/src/smoke/suites/signingKey/logic/index.ts +1 -0
- package/template/apps/qpqjs/services/testa/service/src/smoke/suites/storageDrive/config/defineStorageDriveSmokeProbe.ts +31 -0
- package/template/apps/qpqjs/services/testa/service/src/smoke/suites/storageDrive/config/index.ts +1 -0
- package/template/apps/qpqjs/services/testa/service/src/smoke/suites/storageDrive/entry/index.ts +1 -0
- package/template/apps/qpqjs/services/testa/service/src/smoke/suites/storageDrive/entry/serviceFunction/index.ts +1 -0
- package/template/apps/qpqjs/services/testa/service/src/smoke/suites/storageDrive/index.ts +3 -0
- package/template/apps/qpqjs/services/testa/service/src/smoke/suites/storageDrive/logic/index.ts +1 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-delete.md +1 -1
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-get-all.md +1 -1
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-get.md +1 -1
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-query.md +3 -1
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-scan.md +1 -1
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-update.md +1 -1
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-upsert.md +1 -1
- package/template/docusaurus/docs/config/core/key-value-store.md +12 -2
- package/template/docusaurus/docs/config/features/event-doc.md +22 -1
- package/template/apps/qpqjs/services/test/service/src/echo/config/defineEcho.ts +0 -9
- package/template/apps/qpqjs/services/test/service/src/smoke/constants/smokeProbe.ts +0 -39
- package/template/apps/qpqjs/services/test/service/src/smoke/models/index.ts +0 -5
- package/template/apps/qpqjs/services/test/service/src/smoke/queue/index.ts +0 -3
- package/template/apps/qpqjs/services/test/service/src/smoke/storageDrive/index.ts +0 -4
- package/template/apps/qpqjs/services/test/service/src/smoke/tests/crossService/index.ts +0 -3
- package/template/apps/qpqjs/services/test/service/src/smoke/tests/keyValueStore/index.ts +0 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/tests/scopedKeyValueStore/askRunScopedKeyValueStoreTest.ts +0 -102
- package/template/apps/qpqjs/services/test/service/src/smoke/tests/signingKey/index.ts +0 -1
- package/template/apps/qpqjs/services/test/service/src/smoke/tests/smokeTestRegistry.ts +0 -66
- package/template/apps/qpqjs/services/test/service/src/smoke/tests/storageDrive/index.ts +0 -1
- package/template/apps/qpqjs/services/test/service/src/tick/config/index.ts +0 -1
- package/template/apps/qpqjs/services/testa/service/src/crossServiceProbe/config/defineCrossServiceProbe.ts +0 -68
- package/template/apps/qpqjs/services/testa/service/src/crossServiceProbe/config/index.ts +0 -1
- package/template/apps/qpqjs/services/testa/service/src/crossServiceProbe/entry/serviceFunction/index.ts +0 -3
- package/template/apps/qpqjs/services/testa/service/src/crossServiceProbe/logic/index.ts +0 -3
- /package/template/apps/qpqjs/services/test/service/src/smoke/{tests → harness/assert}/askSmokeAssert.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{tests → harness/assert}/askSmokePollForMarker.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{constants → harness/constants}/SMOKE_RUNS_STORE.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{constants → harness/constants}/githubOidc.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{constants → harness/constants}/smokeRunQueue.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{controller → harness/controller}/askGetSmokeRun.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{controller → harness/controller}/askRunSmokeTests.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{controller → harness/controller}/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{data → harness/data}/askGetSmokeRunById.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{data → harness/data}/askRecordSmokeTestResult.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{data → harness/data}/askSaveSmokeRun.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{data → harness/data}/askSetSmokeRunOutcome.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{data → harness/data}/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{logic → harness/logic}/github/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{logic → harness/logic}/github/verifyGithubOidcToken.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{logic → harness/logic}/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{logic → harness/logic}/smokeRun/askFindSmokeRun.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{logic → harness/logic}/smokeRun/summarizeSmokeRun.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{models → harness/models}/GithubOidcClaims.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{processors → harness/processors}/github/getGithubOidcAuthProcessors.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{processors → harness/processors}/github/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{processors → harness/processors}/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{queue → harness/queue}/onSmokeTestRequested.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{tests → harness/types}/SmokeTestDefinition.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{email → suites/emailReceive/logic}/smokeEmailMarkerId.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/encryptedResources → suites/encryptedResources/logic}/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/eventBus → suites/eventBus/logic}/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{models → suites/eventBus/models}/SmokeProbeEventQueueEvent.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{eventDoc → suites/eventDoc/definition}/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{eventDoc → suites/eventDoc/definition}/smokeProbeDocDefinition.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/eventDoc → suites/eventDoc/logic}/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{models → suites/eventDoc/models}/SmokeEventDocAppendQueueEvent.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{models → suites/eventDoc/models}/SmokeEventDocMark.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{kvsStream → suites/keyValueStoreStream/logic}/smokeStreamMarkerId.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/noop → suites/noop/logic}/askRunNoopTest.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/noop → suites/noop/logic}/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/{echo → smoke/suites/openApi}/controller/echo.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/{echo → smoke/suites/openApi}/controller/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/openApi → suites/openApi/logic}/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/parameter → suites/parameter/logic}/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/{tick → smoke/suites/schedule}/constants/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/{tick → smoke/suites/schedule}/constants/scheduleTickName.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/{tick → smoke/suites/schedule}/constants/scheduleTickStore.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/{tick → smoke/suites/schedule}/entry/kvsStream/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/{tick → smoke/suites/schedule}/entry/kvsStream/onScheduleTickStream.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/{tick → smoke/suites/schedule}/entry/schedule/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/{tick → smoke/suites/schedule}/entry/schedule/onTick.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/schedule → suites/schedule/logic}/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/{tick → smoke/suites/schedule}/models/ScheduleTickRecord.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/{tick → smoke/suites/schedule}/models/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/scopedKeyValueStore → suites/scopedKeyValueStore/logic}/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/scopedStorageDrive → suites/scopedStorageDrive/logic}/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{tests/secret → suites/secret/logic}/index.ts +0 -0
- /package/template/apps/qpqjs/services/test/service/src/smoke/{storageDrive → suites/storageDriveEvent/logic}/smokeFileEventMarkerId.ts +0 -0
- /package/template/apps/qpqjs/services/testa/service/src/{crossServiceProbe → smoke/suites/keyValueStore}/entry/index.ts +0 -0
- /package/template/apps/qpqjs/services/testa/service/src/{crossServiceProbe → smoke/suites/keyValueStore}/entry/serviceFunction/smokeCrossServiceKeyValueStoreProbe.ts +0 -0
- /package/template/apps/qpqjs/services/testa/service/src/{crossServiceProbe → smoke/suites/keyValueStore}/index.ts +0 -0
- /package/template/apps/qpqjs/services/testa/service/src/{crossServiceProbe → smoke/suites/keyValueStore}/logic/askProbeForeignKeyValueStore.ts +0 -0
- /package/template/apps/qpqjs/services/testa/service/src/{crossServiceProbe → smoke/suites/signingKey}/entry/serviceFunction/smokeCrossServiceSigningKeyProbe.ts +0 -0
- /package/template/apps/qpqjs/services/testa/service/src/{crossServiceProbe → smoke/suites/signingKey}/logic/askProbeForeignSigningKey.ts +0 -0
- /package/template/apps/qpqjs/services/testa/service/src/{crossServiceProbe → smoke/suites/storageDrive}/entry/serviceFunction/smokeCrossServiceStorageDriveProbe.ts +0 -0
- /package/template/apps/qpqjs/services/testa/service/src/{crossServiceProbe → smoke/suites/storageDrive}/logic/askProbeForeignStorageDrive.ts +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SmokeSuite } from '../../harness/types/SmokeSuite';
|
|
2
|
+
import { askRunNoopTest } from './logic/askRunNoopTest';
|
|
3
|
+
|
|
4
|
+
/** Proves the harness itself: queue fan-out, result recording, run outcome. */
|
|
5
|
+
export const noopSmokeSuite: SmokeSuite = {
|
|
6
|
+
tests: [{ name: 'noop', askRun: askRunNoopTest }],
|
|
7
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { QPQConfig } from 'quidproquo';
|
|
2
|
+
import { defineDynamicRoutes } from 'quidproquo-features';
|
|
3
|
+
|
|
4
|
+
import * as controllers from '../controller';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The public echo route the openApi tests read back from the document and
|
|
8
|
+
* call over HTTP. The routes carry their own method/path/schema on the
|
|
9
|
+
* handler; this registers the controller module by its path under the
|
|
10
|
+
* service's src root, so the literal must follow this folder if it moves.
|
|
11
|
+
*/
|
|
12
|
+
export const defineOpenApiSmoke = (): QPQConfig =>
|
|
13
|
+
defineDynamicRoutes(controllers, '/smoke/suites/openApi/controller');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './defineOpenApiSmoke';
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
|
|
7
7
|
import { EchoRequest, EchoResponse } from '@qpqjs/test-models';
|
|
8
8
|
|
|
9
|
-
import { askSmokeAssert } from '
|
|
9
|
+
import { askSmokeAssert } from '../../../harness/assert/askSmokeAssert';
|
|
10
10
|
|
|
11
11
|
// The public echo route over real HTTP, from the document's own servers entry,
|
|
12
12
|
// so the same test also proves that entry is a reachable base for this
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { askOpenApiGetDocument, AskResponse } from 'quidproquo';
|
|
2
2
|
|
|
3
|
-
import { askSmokeAssert } from '
|
|
3
|
+
import { askSmokeAssert } from '../../../harness/assert/askSmokeAssert';
|
|
4
4
|
|
|
5
5
|
// The generated document, built in-process from the deployed config. Proves the
|
|
6
6
|
// openApi processor is registered on this runtime and that the route schemas
|
package/template/apps/qpqjs/services/test/service/src/smoke/suites/openApi/openApiSmokeSuite.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SmokeSuite } from '../../harness/types/SmokeSuite';
|
|
2
|
+
import { defineOpenApiSmoke } from './config/defineOpenApiSmoke';
|
|
3
|
+
import { askRunEchoRoundTripTest } from './logic/askRunEchoRoundTripTest';
|
|
4
|
+
import { askRunOpenApiDocumentTest } from './logic/askRunOpenApiDocumentTest';
|
|
5
|
+
|
|
6
|
+
/** The generated OpenAPI document, and the echo route called through its servers entry. */
|
|
7
|
+
export const openApiSmokeSuite: SmokeSuite = {
|
|
8
|
+
defineConfig: defineOpenApiSmoke,
|
|
9
|
+
tests: [
|
|
10
|
+
{ name: 'openApiDocument', askRun: askRunOpenApiDocumentTest },
|
|
11
|
+
{ name: 'echoRoundTrip', askRun: askRunEchoRoundTripTest },
|
|
12
|
+
],
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineParameter, QPQConfig } from 'quidproquo';
|
|
2
|
+
|
|
3
|
+
import { SMOKE_PROBE_PARAMETER } from '../constants/SMOKE_PROBE_PARAMETER';
|
|
4
|
+
import { SMOKE_PROBE_PARAMETER_VALUE } from '../constants/SMOKE_PROBE_PARAMETER_VALUE';
|
|
5
|
+
|
|
6
|
+
/** An owned parameter with a known value, for the parameter test to read back. */
|
|
7
|
+
export const defineParameterSmoke = (): QPQConfig => [
|
|
8
|
+
defineParameter(SMOKE_PROBE_PARAMETER, {
|
|
9
|
+
value: SMOKE_PROBE_PARAMETER_VALUE,
|
|
10
|
+
}),
|
|
11
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './defineParameterSmoke';
|
|
@@ -4,11 +4,9 @@ import {
|
|
|
4
4
|
AskResponse,
|
|
5
5
|
} from 'quidproquo';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} from '../../constants/smokeProbe';
|
|
11
|
-
import { askSmokeAssert } from '../askSmokeAssert';
|
|
7
|
+
import { askSmokeAssert } from '../../../harness/assert/askSmokeAssert';
|
|
8
|
+
import { SMOKE_PROBE_PARAMETER } from '../constants/SMOKE_PROBE_PARAMETER';
|
|
9
|
+
import { SMOKE_PROBE_PARAMETER_VALUE } from '../constants/SMOKE_PROBE_PARAMETER_VALUE';
|
|
12
10
|
|
|
13
11
|
// ssm:GetParameter and ssm:GetParameters against an owned parameter, granted
|
|
14
12
|
// by tag. Read-only on purpose: the runtime role is not granted PutParameter.
|
package/template/apps/qpqjs/services/test/service/src/smoke/suites/parameter/parameterSmokeSuite.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SmokeSuite } from '../../harness/types/SmokeSuite';
|
|
2
|
+
import { defineParameterSmoke } from './config/defineParameterSmoke';
|
|
3
|
+
import { askRunParameterTest } from './logic/askRunParameterTest';
|
|
4
|
+
|
|
5
|
+
/** Reads an owned parameter. */
|
|
6
|
+
export const parameterSmokeSuite: SmokeSuite = {
|
|
7
|
+
defineConfig: defineParameterSmoke,
|
|
8
|
+
tests: [{ name: 'parameter', askRun: askRunParameterTest }],
|
|
9
|
+
};
|
|
@@ -23,7 +23,7 @@ import { ScheduleTickRecord } from '../models/ScheduleTickRecord';
|
|
|
23
23
|
* Every minute, which is the fastest a schedule can go and the only cadence a
|
|
24
24
|
* test can reasonably wait out.
|
|
25
25
|
*/
|
|
26
|
-
export const
|
|
26
|
+
export const defineScheduleSmoke = (): QPQConfig => [
|
|
27
27
|
defineKeyValueStore<ScheduleTickRecord>(
|
|
28
28
|
SCHEDULE_TICK_STORE,
|
|
29
29
|
'scheduleName',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './defineScheduleSmoke';
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
Nullable,
|
|
8
8
|
} from 'quidproquo';
|
|
9
9
|
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
10
|
+
import { askSmokeAssert } from '../../../harness/assert/askSmokeAssert';
|
|
11
|
+
import { SCHEDULE_TICK_NAME } from '../constants/scheduleTickName';
|
|
12
|
+
import { SCHEDULE_TICK_STORE } from '../constants/scheduleTickStore';
|
|
13
|
+
import { ScheduleTickRecord } from '../models/ScheduleTickRecord';
|
|
14
14
|
|
|
15
15
|
// The schedule runs every minute, so the wait has to cover a full boundary
|
|
16
16
|
// plus the stream hop after it. Generous rather than tight: the first fire
|
package/template/apps/qpqjs/services/test/service/src/smoke/suites/schedule/scheduleSmokeSuite.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SmokeSuite } from '../../harness/types/SmokeSuite';
|
|
2
|
+
import { defineScheduleSmoke } from './config/defineScheduleSmoke';
|
|
3
|
+
import { askRunScheduleTest } from './logic/askRunScheduleTest';
|
|
4
|
+
|
|
5
|
+
/** A per-minute schedule and a kvs change stream, proven in one wait. */
|
|
6
|
+
export const scheduleSmokeSuite: SmokeSuite = {
|
|
7
|
+
defineConfig: defineScheduleSmoke,
|
|
8
|
+
tests: [{ name: 'schedule', askRun: askRunScheduleTest }],
|
|
9
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineKeyValueStore, QPQConfig } from 'quidproquo';
|
|
2
|
+
|
|
3
|
+
import { SmokeProbeRecord } from '@qpqjs/test-models';
|
|
4
|
+
|
|
5
|
+
import { SMOKE_SCOPED_PROBE_STORE } from '../constants/SMOKE_SCOPED_PROBE_STORE';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A scoped store: the scope gate in both directions (a scoped store refuses an
|
|
9
|
+
* unscoped call, an unscoped one refuses a scope) and partition isolation
|
|
10
|
+
* between two scopes, including through the category index.
|
|
11
|
+
*/
|
|
12
|
+
export const defineScopedKeyValueStoreSmoke = (): QPQConfig => [
|
|
13
|
+
defineKeyValueStore<SmokeProbeRecord>(
|
|
14
|
+
SMOKE_SCOPED_PROBE_STORE,
|
|
15
|
+
'probeId',
|
|
16
|
+
[],
|
|
17
|
+
{ indexes: ['category'], scoped: true }
|
|
18
|
+
),
|
|
19
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './defineScopedKeyValueStoreSmoke';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SMOKE_SCOPED_PROBE_STORE';
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import {
|
|
2
|
+
askCatch,
|
|
3
|
+
askDelay,
|
|
4
|
+
askKeyValueStoreDelete,
|
|
5
|
+
askKeyValueStoreGet,
|
|
6
|
+
askKeyValueStoreGetBase,
|
|
7
|
+
askKeyValueStoreQuery,
|
|
8
|
+
askKeyValueStoreQueryBase,
|
|
9
|
+
askKeyValueStoreUpdate,
|
|
10
|
+
askKeyValueStoreUpsert,
|
|
11
|
+
askKeyValueStoreUpsertBase,
|
|
12
|
+
askNewGuid,
|
|
13
|
+
AskResponse,
|
|
14
|
+
kvsEqual,
|
|
15
|
+
kvsSet,
|
|
16
|
+
kvsUpdate,
|
|
17
|
+
} from 'quidproquo';
|
|
18
|
+
|
|
19
|
+
import { SMOKE_PROBE_STORE } from '@qpqjs/constants';
|
|
20
|
+
import { SmokeProbeRecord } from '@qpqjs/test-models';
|
|
21
|
+
|
|
22
|
+
import { askSmokeAssert } from '../../../harness/assert/askSmokeAssert';
|
|
23
|
+
import { SMOKE_SCOPED_PROBE_STORE } from '../constants/SMOKE_SCOPED_PROBE_STORE';
|
|
24
|
+
|
|
25
|
+
const INDEX_POLL_ATTEMPTS = 10;
|
|
26
|
+
const INDEX_POLL_INTERVAL_MS = 1000;
|
|
27
|
+
|
|
28
|
+
const probeIdsOf = (items: SmokeProbeRecord[]): string =>
|
|
29
|
+
items
|
|
30
|
+
.map((item) => item.probeId)
|
|
31
|
+
.sort()
|
|
32
|
+
.join(',');
|
|
33
|
+
|
|
34
|
+
// GSI reads are eventually consistent, so poll until the scoped category
|
|
35
|
+
// index shows exactly the expected rows, returning the last read either way
|
|
36
|
+
// for the caller to assert on.
|
|
37
|
+
function* askSmokeScopedCategoryQuery(
|
|
38
|
+
category: string,
|
|
39
|
+
scope: string,
|
|
40
|
+
expectedProbeIds: string[]
|
|
41
|
+
): AskResponse<SmokeProbeRecord[]> {
|
|
42
|
+
const expected = [...expectedProbeIds].sort().join(',');
|
|
43
|
+
|
|
44
|
+
let items: SmokeProbeRecord[] = [];
|
|
45
|
+
for (let attempt = 0; attempt < INDEX_POLL_ATTEMPTS; attempt += 1) {
|
|
46
|
+
const page = yield* askKeyValueStoreQuery<SmokeProbeRecord>(
|
|
47
|
+
SMOKE_SCOPED_PROBE_STORE,
|
|
48
|
+
kvsEqual('category', category),
|
|
49
|
+
{ scope }
|
|
50
|
+
);
|
|
51
|
+
items = page.items;
|
|
52
|
+
if (probeIdsOf(items) === expected) {
|
|
53
|
+
return items;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
yield* askDelay(INDEX_POLL_INTERVAL_MS);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return items;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// The scope gate on a store, on whichever backend is running: a scoped store
|
|
63
|
+
// serves scoped calls (including queries on the pk and on a GSI) and keeps two
|
|
64
|
+
// scopes apart, refuses an unscoped call, and an unscoped store refuses a
|
|
65
|
+
// scoped one. On dynamo the scope is composed into the partition key and into
|
|
66
|
+
// a hidden copy of each GSI partition key, so the reads also prove neither
|
|
67
|
+
// composed form leaks to the caller, and a page key can't cross scopes.
|
|
68
|
+
export function* askRunScopedKeyValueStoreTest(): AskResponse<void> {
|
|
69
|
+
const probeId = yield* askNewGuid();
|
|
70
|
+
const otherProbeId = yield* askNewGuid();
|
|
71
|
+
const scopeA = `smoke-a-${probeId}`;
|
|
72
|
+
const scopeB = `smoke-b-${probeId}`;
|
|
73
|
+
const category = `scoped-kvs-${probeId}`;
|
|
74
|
+
const movedCategory = `scoped-kvs-moved-${probeId}`;
|
|
75
|
+
|
|
76
|
+
const record: SmokeProbeRecord = { probeId, category, value: 1 };
|
|
77
|
+
yield* askKeyValueStoreUpsert<SmokeProbeRecord>(
|
|
78
|
+
SMOKE_SCOPED_PROBE_STORE,
|
|
79
|
+
record,
|
|
80
|
+
{ scope: scopeA }
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
const written = yield* askKeyValueStoreGet<SmokeProbeRecord>(
|
|
84
|
+
SMOKE_SCOPED_PROBE_STORE,
|
|
85
|
+
probeId,
|
|
86
|
+
{ scope: scopeA }
|
|
87
|
+
);
|
|
88
|
+
yield* askSmokeAssert(
|
|
89
|
+
written?.probeId === probeId && written.value === 1,
|
|
90
|
+
'scoped get did not return the record with its raw key'
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
const byKey = yield* askKeyValueStoreQuery<SmokeProbeRecord>(
|
|
94
|
+
SMOKE_SCOPED_PROBE_STORE,
|
|
95
|
+
kvsEqual('probeId', probeId),
|
|
96
|
+
{ scope: scopeA }
|
|
97
|
+
);
|
|
98
|
+
yield* askSmokeAssert(
|
|
99
|
+
byKey.items.some((item) => item.category === category),
|
|
100
|
+
'scoped query by partition key did not return the record'
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
const fromB = yield* askKeyValueStoreGet<SmokeProbeRecord>(
|
|
104
|
+
SMOKE_SCOPED_PROBE_STORE,
|
|
105
|
+
probeId,
|
|
106
|
+
{ scope: scopeB }
|
|
107
|
+
);
|
|
108
|
+
yield* askSmokeAssert(
|
|
109
|
+
!fromB,
|
|
110
|
+
'record written under scope A is visible from scope B'
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
// The same category under another scope: the category GSI must only ever
|
|
114
|
+
// answer with the querying scope's own rows.
|
|
115
|
+
yield* askKeyValueStoreUpsert<SmokeProbeRecord>(
|
|
116
|
+
SMOKE_SCOPED_PROBE_STORE,
|
|
117
|
+
{ probeId: otherProbeId, category, value: 2 },
|
|
118
|
+
{ scope: scopeB }
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
const byCategory = yield* askSmokeScopedCategoryQuery(category, scopeA, [
|
|
122
|
+
probeId,
|
|
123
|
+
]);
|
|
124
|
+
yield* askSmokeAssert(
|
|
125
|
+
probeIdsOf(byCategory) === probeId,
|
|
126
|
+
`scoped index query returned [${probeIdsOf(byCategory)}], expected only [${probeId}]`
|
|
127
|
+
);
|
|
128
|
+
yield* askSmokeAssert(
|
|
129
|
+
byCategory.every((item) =>
|
|
130
|
+
Object.keys(item).every((attribute) => !attribute.includes('@@QPQ'))
|
|
131
|
+
),
|
|
132
|
+
'scoped index query leaked a reserved @@QPQ attribute'
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
// Paging a scoped index: the scope's own page key (a real DynamoDB page key,
|
|
136
|
+
// carrying the hidden index copy) continues the listing, and the same key
|
|
137
|
+
// used from another scope is refused rather than read.
|
|
138
|
+
const pagedProbeId = yield* askNewGuid();
|
|
139
|
+
yield* askKeyValueStoreUpsert<SmokeProbeRecord>(
|
|
140
|
+
SMOKE_SCOPED_PROBE_STORE,
|
|
141
|
+
{ probeId: pagedProbeId, category, value: 3 },
|
|
142
|
+
{ scope: scopeB }
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
const scopeBRows = [otherProbeId, pagedProbeId].sort().join(',');
|
|
146
|
+
const indexedInB = yield* askSmokeScopedCategoryQuery(category, scopeB, [
|
|
147
|
+
otherProbeId,
|
|
148
|
+
pagedProbeId,
|
|
149
|
+
]);
|
|
150
|
+
yield* askSmokeAssert(
|
|
151
|
+
probeIdsOf(indexedInB) === scopeBRows,
|
|
152
|
+
'scoped index never showed both of scope B rows'
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
const firstPage = yield* askKeyValueStoreQuery<SmokeProbeRecord>(
|
|
156
|
+
SMOKE_SCOPED_PROBE_STORE,
|
|
157
|
+
kvsEqual('category', category),
|
|
158
|
+
{ scope: scopeB, limit: 1 }
|
|
159
|
+
);
|
|
160
|
+
yield* askSmokeAssert(
|
|
161
|
+
firstPage.items.length === 1 && !!firstPage.nextPageKey,
|
|
162
|
+
'scoped index query with limit 1 did not return a page key'
|
|
163
|
+
);
|
|
164
|
+
|
|
165
|
+
const secondPage = yield* askKeyValueStoreQuery<SmokeProbeRecord>(
|
|
166
|
+
SMOKE_SCOPED_PROBE_STORE,
|
|
167
|
+
kvsEqual('category', category),
|
|
168
|
+
{ scope: scopeB, limit: 1, nextPageKey: firstPage.nextPageKey }
|
|
169
|
+
);
|
|
170
|
+
yield* askSmokeAssert(
|
|
171
|
+
probeIdsOf([...firstPage.items, ...secondPage.items]) === scopeBRows,
|
|
172
|
+
'paging the scoped index did not walk both of scope B rows'
|
|
173
|
+
);
|
|
174
|
+
|
|
175
|
+
const pageKeyFromOtherScope = yield* askCatch(
|
|
176
|
+
askKeyValueStoreQuery<SmokeProbeRecord>(
|
|
177
|
+
SMOKE_SCOPED_PROBE_STORE,
|
|
178
|
+
kvsEqual('category', category),
|
|
179
|
+
{ scope: scopeA, nextPageKey: firstPage.nextPageKey }
|
|
180
|
+
)
|
|
181
|
+
);
|
|
182
|
+
yield* askSmokeAssert(
|
|
183
|
+
!pageKeyFromOtherScope.success &&
|
|
184
|
+
pageKeyFromOtherScope.error.errorType ===
|
|
185
|
+
askKeyValueStoreQueryBase.errorType.InvalidScope,
|
|
186
|
+
'scope B page key was not refused from scope A'
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
// Changing the indexed attribute moves the row's index entry with it.
|
|
190
|
+
yield* askKeyValueStoreUpdate(
|
|
191
|
+
SMOKE_SCOPED_PROBE_STORE,
|
|
192
|
+
kvsUpdate([kvsSet('category', movedCategory)]),
|
|
193
|
+
probeId,
|
|
194
|
+
undefined,
|
|
195
|
+
{ scope: scopeA }
|
|
196
|
+
);
|
|
197
|
+
|
|
198
|
+
const moved = yield* askSmokeScopedCategoryQuery(movedCategory, scopeA, [
|
|
199
|
+
probeId,
|
|
200
|
+
]);
|
|
201
|
+
yield* askSmokeAssert(
|
|
202
|
+
probeIdsOf(moved) === probeId,
|
|
203
|
+
'scoped index query did not follow the updated category'
|
|
204
|
+
);
|
|
205
|
+
|
|
206
|
+
const leftBehind = yield* askSmokeScopedCategoryQuery(category, scopeA, []);
|
|
207
|
+
yield* askSmokeAssert(
|
|
208
|
+
leftBehind.length === 0,
|
|
209
|
+
'scoped index query still found the record under its old category'
|
|
210
|
+
);
|
|
211
|
+
|
|
212
|
+
const unscopedGet = yield* askCatch(
|
|
213
|
+
askKeyValueStoreGet<SmokeProbeRecord>(SMOKE_SCOPED_PROBE_STORE, probeId)
|
|
214
|
+
);
|
|
215
|
+
yield* askSmokeAssert(
|
|
216
|
+
!unscopedGet.success &&
|
|
217
|
+
unscopedGet.error.errorType ===
|
|
218
|
+
askKeyValueStoreGetBase.errorType.InvalidScope,
|
|
219
|
+
'unscoped get on the scoped store was not refused with InvalidScope'
|
|
220
|
+
);
|
|
221
|
+
|
|
222
|
+
const scopedUpsertOnUnscopedStore = yield* askCatch(
|
|
223
|
+
askKeyValueStoreUpsert<SmokeProbeRecord>(SMOKE_PROBE_STORE, record, {
|
|
224
|
+
scope: scopeA,
|
|
225
|
+
})
|
|
226
|
+
);
|
|
227
|
+
yield* askSmokeAssert(
|
|
228
|
+
!scopedUpsertOnUnscopedStore.success &&
|
|
229
|
+
scopedUpsertOnUnscopedStore.error.errorType ===
|
|
230
|
+
askKeyValueStoreUpsertBase.errorType.InvalidScope,
|
|
231
|
+
'scoped upsert on the unscoped store was not refused with InvalidScope'
|
|
232
|
+
);
|
|
233
|
+
|
|
234
|
+
yield* askKeyValueStoreDelete(SMOKE_SCOPED_PROBE_STORE, probeId, undefined, {
|
|
235
|
+
scope: scopeA,
|
|
236
|
+
});
|
|
237
|
+
yield* askKeyValueStoreDelete(
|
|
238
|
+
SMOKE_SCOPED_PROBE_STORE,
|
|
239
|
+
otherProbeId,
|
|
240
|
+
undefined,
|
|
241
|
+
{ scope: scopeB }
|
|
242
|
+
);
|
|
243
|
+
yield* askKeyValueStoreDelete(
|
|
244
|
+
SMOKE_SCOPED_PROBE_STORE,
|
|
245
|
+
pagedProbeId,
|
|
246
|
+
undefined,
|
|
247
|
+
{ scope: scopeB }
|
|
248
|
+
);
|
|
249
|
+
|
|
250
|
+
const deleted = yield* askKeyValueStoreGet<SmokeProbeRecord>(
|
|
251
|
+
SMOKE_SCOPED_PROBE_STORE,
|
|
252
|
+
probeId,
|
|
253
|
+
{ scope: scopeA }
|
|
254
|
+
);
|
|
255
|
+
yield* askSmokeAssert(!deleted, 'scoped record still present after delete');
|
|
256
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SmokeSuite } from '../../harness/types/SmokeSuite';
|
|
2
|
+
import { defineScopedKeyValueStoreSmoke } from './config/defineScopedKeyValueStoreSmoke';
|
|
3
|
+
import { askRunScopedKeyValueStoreTest } from './logic/askRunScopedKeyValueStoreTest';
|
|
4
|
+
|
|
5
|
+
/** A scoped store's gate and partition isolation. */
|
|
6
|
+
export const scopedKeyValueStoreSmokeSuite: SmokeSuite = {
|
|
7
|
+
defineConfig: defineScopedKeyValueStoreSmoke,
|
|
8
|
+
tests: [
|
|
9
|
+
{ name: 'scopedKeyValueStore', askRun: askRunScopedKeyValueStoreTest },
|
|
10
|
+
],
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineStorageDrive, QPQConfig } from 'quidproquo';
|
|
2
|
+
|
|
3
|
+
import { SMOKE_SCOPED_PROBE_DRIVE } from '../constants/SMOKE_SCOPED_PROBE_DRIVE';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A scoped drive for the scope gate in both directions (it refuses an unscoped
|
|
7
|
+
* call, the harness's unscoped probe drive refuses a scope) and partition
|
|
8
|
+
* isolation between two scopes.
|
|
9
|
+
*/
|
|
10
|
+
export const defineScopedStorageDriveSmoke = (): QPQConfig => [
|
|
11
|
+
defineStorageDrive(SMOKE_SCOPED_PROBE_DRIVE, { scoped: true }),
|
|
12
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './defineScopedStorageDriveSmoke';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SMOKE_SCOPED_PROBE_DRIVE';
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
|
|
12
12
|
import { SMOKE_PROBE_DRIVE } from '@qpqjs/constants';
|
|
13
13
|
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
14
|
+
import { askSmokeAssert } from '../../../harness/assert/askSmokeAssert';
|
|
15
|
+
import { SMOKE_SCOPED_PROBE_DRIVE } from '../constants/SMOKE_SCOPED_PROBE_DRIVE';
|
|
16
16
|
|
|
17
17
|
// The scope gate on a drive, on whichever backend is running: a scoped drive
|
|
18
18
|
// serves scoped calls and keeps two scopes apart, refuses an unscoped call,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SmokeSuite } from '../../harness/types/SmokeSuite';
|
|
2
|
+
import { defineScopedStorageDriveSmoke } from './config/defineScopedStorageDriveSmoke';
|
|
3
|
+
import { askRunScopedStorageDriveTest } from './logic/askRunScopedStorageDriveTest';
|
|
4
|
+
|
|
5
|
+
/** A scoped drive's gate and partition isolation. */
|
|
6
|
+
export const scopedStorageDriveSmokeSuite: SmokeSuite = {
|
|
7
|
+
defineConfig: defineScopedStorageDriveSmoke,
|
|
8
|
+
tests: [{ name: 'scopedStorageDrive', askRun: askRunScopedStorageDriveTest }],
|
|
9
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { defineSecret, QPQConfig } from 'quidproquo';
|
|
2
|
+
|
|
3
|
+
import { SMOKE_PROBE_SECRET } from '../constants/SMOKE_PROBE_SECRET';
|
|
4
|
+
|
|
5
|
+
/** An owned secret for the secret test to read. */
|
|
6
|
+
export const defineSecretSmoke = (): QPQConfig => [
|
|
7
|
+
defineSecret(SMOKE_PROBE_SECRET),
|
|
8
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './defineSecretSmoke';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SMOKE_PROBE_SECRET';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { askConfigGetSecret, AskResponse } from 'quidproquo';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { askSmokeAssert } from '../../../harness/assert/askSmokeAssert';
|
|
4
|
+
import { SMOKE_PROBE_SECRET } from '../constants/SMOKE_PROBE_SECRET';
|
|
5
5
|
|
|
6
6
|
// secretsmanager:GetSecretValue against an owned secret, granted by tag. The
|
|
7
7
|
// deployed secret is created without an explicit value, so the platform
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SmokeSuite } from '../../harness/types/SmokeSuite';
|
|
2
|
+
import { defineSecretSmoke } from './config/defineSecretSmoke';
|
|
3
|
+
import { askRunSecretTest } from './logic/askRunSecretTest';
|
|
4
|
+
|
|
5
|
+
/** Reads an owned secret. */
|
|
6
|
+
export const secretSmokeSuite: SmokeSuite = {
|
|
7
|
+
defineConfig: defineSecretSmoke,
|
|
8
|
+
tests: [{ name: 'secret', askRun: askRunSecretTest }],
|
|
9
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineSigningKey, QPQConfig } from 'quidproquo';
|
|
2
|
+
|
|
3
|
+
import { SMOKE_PROBE_SIGNING_KEY } from '@qpqjs/constants';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* An owned RSA signing key: kms:Sign and kms:GetPublicKey through the
|
|
7
|
+
* alias-conditioned grant. testa declares the same key foreign (see its
|
|
8
|
+
* smoke/suites/signingKey) for the cross-service verify test.
|
|
9
|
+
*/
|
|
10
|
+
export const defineSigningKeySmoke = (): QPQConfig => [
|
|
11
|
+
defineSigningKey(SMOKE_PROBE_SIGNING_KEY),
|
|
12
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './defineSigningKeySmoke';
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
CrossServiceSigningKeyProbeResult,
|
|
18
18
|
} from '@qpqjs/testa-models';
|
|
19
19
|
|
|
20
|
-
import { askSmokeAssert } from '
|
|
20
|
+
import { askSmokeAssert } from '../../../harness/assert/askSmokeAssert';
|
|
21
21
|
|
|
22
22
|
// The issuer/verifier split a signing key exists for: THIS service signs a
|
|
23
23
|
// jwt with its owned key, testa verifies it through its foreign declaration
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import { SMOKE_PROBE_SIGNING_KEY } from '@qpqjs/constants';
|
|
12
12
|
import { SmokeSigningKeyClaims } from '@qpqjs/test-models';
|
|
13
13
|
|
|
14
|
-
import { askSmokeAssert } from '
|
|
14
|
+
import { askSmokeAssert } from '../../../harness/assert/askSmokeAssert';
|
|
15
15
|
|
|
16
16
|
const PUBLIC_KEY_PEM_HEADER = '-----BEGIN PUBLIC KEY-----';
|
|
17
17
|
|