@toa.io/extensions.exposition 1.0.0-alpha.4 → 1.0.0-alpha.41
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/components/context.toa.yaml +2 -2
- package/components/identity.bans/manifest.toa.yaml +15 -7
- package/components/identity.bans/operations/transit.d.ts +14 -0
- package/components/identity.bans/operations/transit.js +11 -0
- package/components/identity.bans/operations/transit.js.map +1 -0
- package/components/identity.bans/operations/tsconfig.tsbuildinfo +1 -0
- package/components/identity.bans/source/transit.ts +21 -0
- package/components/identity.bans/tsconfig.json +9 -0
- package/components/identity.basic/manifest.toa.yaml +22 -9
- package/components/identity.basic/operations/authenticate.d.ts +5 -1
- package/components/identity.basic/operations/authenticate.js +5 -2
- package/components/identity.basic/operations/authenticate.js.map +1 -1
- package/components/identity.basic/operations/incept.d.ts +12 -0
- package/components/identity.basic/operations/incept.js +26 -0
- package/components/identity.basic/operations/incept.js.map +1 -0
- package/components/identity.basic/operations/transit.d.ts +4 -4
- package/components/identity.basic/operations/transit.js +5 -3
- package/components/identity.basic/operations/transit.js.map +1 -1
- package/components/identity.basic/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.basic/operations/types.d.ts +8 -4
- package/components/identity.basic/source/authenticate.ts +16 -5
- package/components/identity.basic/source/incept.ts +38 -0
- package/components/identity.basic/source/transit.ts +8 -6
- package/components/identity.basic/source/types.ts +8 -4
- package/components/identity.federation/manifest.toa.yaml +28 -22
- package/components/identity.federation/operations/authenticate.d.ts +2 -2
- package/components/identity.federation/operations/authenticate.js +3 -10
- package/components/identity.federation/operations/authenticate.js.map +1 -1
- package/components/identity.federation/operations/incept.d.ts +11 -0
- package/components/identity.federation/operations/{create.js → incept.js} +6 -7
- package/components/identity.federation/operations/incept.js.map +1 -0
- package/components/identity.federation/operations/lib/jwt.d.ts +4 -5
- package/components/identity.federation/operations/lib/jwt.js +3 -3
- package/components/identity.federation/operations/lib/jwt.js.map +1 -1
- package/components/identity.federation/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.federation/operations/types/configuration.d.ts +14 -0
- package/components/identity.federation/operations/types/configuration.js +3 -0
- package/components/identity.federation/operations/types/configuration.js.map +1 -0
- package/components/identity.federation/operations/{types.d.ts → types/context.d.ts} +13 -6
- package/components/identity.federation/operations/types/context.js +3 -0
- package/components/identity.federation/operations/types/context.js.map +1 -0
- package/components/identity.federation/operations/types/entity.d.ts +6 -0
- package/components/identity.federation/operations/{types.js → types/entity.js} +1 -1
- package/components/identity.federation/operations/types/entity.js.map +1 -0
- package/components/identity.federation/operations/types/index.d.ts +3 -0
- package/components/identity.federation/operations/types/index.js +20 -0
- package/components/identity.federation/operations/types/index.js.map +1 -0
- package/components/identity.federation/source/authenticate.ts +5 -18
- package/components/identity.federation/source/{create.ts → incept.ts} +10 -9
- package/components/identity.federation/source/lib/jwt.test.ts +2 -2
- package/components/identity.federation/source/lib/jwt.ts +7 -8
- package/components/identity.federation/source/types/configuration.ts +15 -0
- package/components/identity.federation/source/{types.ts → types/context.ts} +15 -5
- package/components/identity.federation/source/types/entity.ts +6 -0
- package/components/identity.federation/source/types/index.ts +3 -0
- package/components/identity.federation/tsconfig.json +2 -2
- package/components/identity.roles/manifest.toa.yaml +18 -6
- package/components/identity.roles/operations/grant.d.ts +10 -0
- package/components/identity.roles/operations/grant.js +21 -0
- package/components/identity.roles/operations/grant.js.map +1 -0
- package/components/identity.roles/operations/lib/Entity.d.ts +5 -0
- package/components/identity.roles/operations/lib/Entity.js +3 -0
- package/components/identity.roles/operations/lib/Entity.js.map +1 -0
- package/components/identity.roles/operations/list.d.ts +1 -4
- package/components/identity.roles/operations/list.js.map +1 -1
- package/components/identity.roles/operations/principal.d.ts +4 -6
- package/components/identity.roles/operations/principal.js +6 -1
- package/components/identity.roles/operations/principal.js.map +1 -1
- package/components/identity.roles/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.roles/source/grant.ts +32 -0
- package/components/identity.roles/source/lib/Entity.ts +5 -0
- package/components/identity.roles/source/list.ts +2 -4
- package/components/identity.roles/source/principal.ts +10 -8
- package/components/identity.tokens/manifest.toa.yaml +19 -5
- package/components/identity.tokens/operations/authenticate.d.ts +2 -2
- package/components/identity.tokens/operations/authenticate.js +10 -4
- package/components/identity.tokens/operations/authenticate.js.map +1 -1
- package/components/identity.tokens/operations/decrypt.js +1 -0
- package/components/identity.tokens/operations/decrypt.js.map +1 -1
- package/components/identity.tokens/operations/encrypt.js +5 -1
- package/components/identity.tokens/operations/encrypt.js.map +1 -1
- package/components/identity.tokens/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.tokens/operations/types.d.ts +8 -2
- package/components/identity.tokens/receivers/identity.bans.created.js +3 -0
- package/components/identity.tokens/source/authenticate.test.ts +11 -4
- package/components/identity.tokens/source/authenticate.ts +12 -5
- package/components/identity.tokens/source/decrypt.test.ts +5 -3
- package/components/identity.tokens/source/decrypt.ts +9 -8
- package/components/identity.tokens/source/encrypt.test.ts +26 -2
- package/components/identity.tokens/source/encrypt.ts +5 -1
- package/components/identity.tokens/source/types.ts +9 -2
- package/components/octets.storage/manifest.toa.yaml +0 -7
- package/documentation/access.md +27 -16
- package/documentation/authorities.md +53 -0
- package/documentation/cache.md +8 -1
- package/documentation/components.md +47 -22
- package/documentation/identity.md +17 -22
- package/documentation/io.md +56 -0
- package/documentation/protocol.md +3 -0
- package/documentation/query.md +17 -11
- package/documentation/require.md +15 -0
- package/documentation/tree.md +22 -4
- package/documentation/vary.md +14 -14
- package/features/access.feature +89 -47
- package/features/annotation.feature +2 -0
- package/features/authorities.basic.feature +141 -0
- package/features/authorities.feature +32 -0
- package/features/authorities.federation.feature +99 -0
- package/features/authorities.tokens.feature +118 -0
- package/features/body.feature +4 -0
- package/features/cache.feature +112 -5
- package/features/cors.feature +7 -2
- package/features/debug.feature +34 -0
- package/features/directives.feature +5 -0
- package/features/dynamic.feature +18 -7
- package/features/errors.feature +18 -4
- package/features/etag.feature +18 -1
- package/features/identity.bans.feature +137 -0
- package/features/identity.basic.feature +142 -19
- package/features/identity.feature +7 -2
- package/features/identity.federation.feature +67 -14
- package/features/identity.roles.feature +220 -4
- package/features/identity.tokens.feature +57 -4
- package/features/io.feature +205 -0
- package/features/octets.entries.feature +10 -0
- package/features/octets.feature +60 -64
- package/features/octets.meta.feature +7 -3
- package/features/octets.workflows.feature +14 -0
- package/features/probes.feature +14 -0
- package/features/{queries.feature → query.feature} +50 -3
- package/features/require.feature +67 -0
- package/features/response.feature +12 -3
- package/features/routes.feature +25 -12
- package/features/steps/Database.ts +17 -10
- package/features/steps/Gateway.ts +23 -6
- package/features/steps/IdP.ts +28 -23
- package/features/steps/components/echo/manifest.toa.yaml +5 -1
- package/features/steps/components/echo/operations/identity.js +7 -0
- package/features/steps/components/pots/manifest.toa.yaml +2 -0
- package/features/steps/components/users.properties/manifest.toa.yaml +2 -1
- package/features/streams.feature +1 -0
- package/features/timing.feature +27 -1
- package/features/vary.feature +105 -3
- package/package.json +12 -11
- package/readme.md +19 -14
- package/schemas/annotation.cos.yaml +1 -1
- package/schemas/io/input.cos.yaml +3 -0
- package/schemas/io/message.cos.yaml +5 -0
- package/schemas/io/output.cos.yaml +5 -0
- package/source/Annotation.ts +3 -3
- package/source/Context.ts +6 -4
- package/source/Directive.test.ts +4 -4
- package/source/Directive.ts +11 -38
- package/source/Endpoint.ts +43 -8
- package/source/Factory.ts +11 -7
- package/source/Gateway.ts +16 -44
- package/source/HTTP/Context.ts +24 -2
- package/source/HTTP/Server.ts +56 -43
- package/source/HTTP/exceptions.ts +7 -1
- package/source/HTTP/messages.test.ts +38 -2
- package/source/HTTP/messages.ts +7 -3
- package/source/Mapping.ts +6 -1
- package/source/Query.test.ts +1 -1
- package/source/Query.ts +35 -24
- package/source/RTD/Context.ts +7 -10
- package/source/RTD/Directives.ts +28 -4
- package/source/RTD/Endpoint.ts +6 -4
- package/source/RTD/Match.ts +2 -7
- package/source/RTD/Method.ts +7 -13
- package/source/RTD/Node.ts +13 -14
- package/source/RTD/Tree.ts +17 -16
- package/source/RTD/factory.ts +3 -6
- package/source/Tenant.ts +0 -8
- package/source/deployment.ts +32 -22
- package/source/directives/auth/Authorization.ts +38 -19
- package/source/directives/auth/Delegate.ts +42 -0
- package/source/directives/auth/Incept.ts +3 -2
- package/source/directives/auth/Role.test.ts +53 -6
- package/source/directives/auth/Role.ts +22 -14
- package/source/directives/auth/types.ts +1 -1
- package/source/directives/cache/Cache.ts +15 -8
- package/source/directives/cache/Control.ts +42 -16
- package/source/directives/cors/CORS.ts +13 -7
- package/source/directives/dev/Development.ts +4 -4
- package/source/directives/index.ts +6 -4
- package/source/directives/io/Directive.ts +11 -0
- package/source/directives/io/IO.ts +43 -0
- package/source/directives/io/Input.ts +50 -0
- package/source/directives/io/Message.ts +1 -0
- package/source/directives/io/Output.ts +69 -0
- package/source/directives/io/index.ts +3 -0
- package/source/directives/io/schemas.ts +12 -0
- package/source/directives/octets/Context.ts +4 -3
- package/source/directives/octets/Delete.ts +4 -2
- package/source/directives/octets/Directive.ts +10 -0
- package/source/directives/octets/Fetch.ts +4 -3
- package/source/directives/octets/List.ts +4 -2
- package/source/directives/octets/Octets.ts +6 -8
- package/source/directives/octets/Store.ts +12 -4
- package/source/directives/octets/Workflow.ts +10 -3
- package/source/directives/octets/types.ts +0 -7
- package/source/directives/require/Directive.ts +5 -0
- package/source/directives/require/Headers.ts +20 -0
- package/source/directives/require/Require.ts +28 -0
- package/source/directives/require/index.ts +3 -0
- package/source/directives/vary/Directive.ts +2 -1
- package/source/directives/vary/Embed.ts +14 -8
- package/source/directives/vary/Vary.ts +7 -5
- package/source/directives/vary/embeddings/Authority.ts +8 -0
- package/source/directives/vary/embeddings/Embedding.ts +2 -1
- package/source/directives/vary/embeddings/Header.ts +8 -6
- package/source/directives/vary/embeddings/Language.ts +1 -1
- package/source/directives/vary/embeddings/Parameter.ts +14 -0
- package/source/directives/vary/embeddings/index.ts +6 -4
- package/source/exceptions.ts +22 -11
- package/source/root.ts +5 -0
- package/source/schemas.ts +1 -1
- package/transpiled/Annotation.d.ts +3 -3
- package/transpiled/Context.d.ts +6 -4
- package/transpiled/Directive.d.ts +4 -17
- package/transpiled/Directive.js +4 -7
- package/transpiled/Directive.js.map +1 -1
- package/transpiled/Endpoint.d.ts +5 -3
- package/transpiled/Endpoint.js +30 -5
- package/transpiled/Endpoint.js.map +1 -1
- package/transpiled/Factory.js +9 -4
- package/transpiled/Factory.js.map +1 -1
- package/transpiled/Gateway.d.ts +1 -4
- package/transpiled/Gateway.js +10 -26
- package/transpiled/Gateway.js.map +1 -1
- package/transpiled/HTTP/Context.d.ts +8 -1
- package/transpiled/HTTP/Context.js +15 -2
- package/transpiled/HTTP/Context.js.map +1 -1
- package/transpiled/HTTP/Server.d.ts +13 -2
- package/transpiled/HTTP/Server.js +41 -35
- package/transpiled/HTTP/Server.js.map +1 -1
- package/transpiled/HTTP/exceptions.d.ts +4 -1
- package/transpiled/HTTP/exceptions.js +7 -1
- package/transpiled/HTTP/exceptions.js.map +1 -1
- package/transpiled/HTTP/messages.d.ts +1 -0
- package/transpiled/HTTP/messages.js +9 -3
- package/transpiled/HTTP/messages.js.map +1 -1
- package/transpiled/Mapping.js +4 -1
- package/transpiled/Mapping.js.map +1 -1
- package/transpiled/Query.d.ts +1 -0
- package/transpiled/Query.js +21 -20
- package/transpiled/Query.js.map +1 -1
- package/transpiled/RTD/Context.d.ts +7 -6
- package/transpiled/RTD/Directives.d.ts +19 -4
- package/transpiled/RTD/Endpoint.d.ts +6 -4
- package/transpiled/RTD/Match.d.ts +2 -4
- package/transpiled/RTD/Method.d.ts +7 -7
- package/transpiled/RTD/Method.js.map +1 -1
- package/transpiled/RTD/Node.d.ts +4 -6
- package/transpiled/RTD/Node.js +2 -1
- package/transpiled/RTD/Node.js.map +1 -1
- package/transpiled/RTD/Tree.d.ts +6 -6
- package/transpiled/RTD/Tree.js +4 -1
- package/transpiled/RTD/Tree.js.map +1 -1
- package/transpiled/RTD/factory.d.ts +2 -4
- package/transpiled/RTD/factory.js +1 -1
- package/transpiled/RTD/factory.js.map +1 -1
- package/transpiled/Tenant.d.ts +0 -1
- package/transpiled/Tenant.js +0 -6
- package/transpiled/Tenant.js.map +1 -1
- package/transpiled/deployment.d.ts +1 -1
- package/transpiled/deployment.js +28 -20
- package/transpiled/deployment.js.map +1 -1
- package/transpiled/directives/auth/Authorization.d.ts +2 -3
- package/transpiled/directives/auth/Authorization.js +26 -12
- package/transpiled/directives/auth/Authorization.js.map +1 -1
- package/transpiled/directives/auth/Delegate.d.ts +10 -0
- package/transpiled/directives/auth/Delegate.js +34 -0
- package/transpiled/directives/auth/Delegate.js.map +1 -0
- package/transpiled/directives/auth/Incept.js +3 -2
- package/transpiled/directives/auth/Incept.js.map +1 -1
- package/transpiled/directives/auth/Role.d.ts +4 -1
- package/transpiled/directives/auth/Role.js +20 -14
- package/transpiled/directives/auth/Role.js.map +1 -1
- package/transpiled/directives/cache/Cache.d.ts +5 -5
- package/transpiled/directives/cache/Cache.js +10 -4
- package/transpiled/directives/cache/Cache.js.map +1 -1
- package/transpiled/directives/cache/Control.d.ts +2 -1
- package/transpiled/directives/cache/Control.js +29 -12
- package/transpiled/directives/cache/Control.js.map +1 -1
- package/transpiled/directives/cors/CORS.d.ts +2 -3
- package/transpiled/directives/cors/CORS.js +13 -7
- package/transpiled/directives/cors/CORS.js.map +1 -1
- package/transpiled/directives/dev/Development.d.ts +3 -3
- package/transpiled/directives/dev/Development.js +1 -1
- package/transpiled/directives/dev/Development.js.map +1 -1
- package/transpiled/directives/index.d.ts +2 -2
- package/transpiled/directives/index.js +5 -3
- package/transpiled/directives/index.js.map +1 -1
- package/transpiled/directives/io/Directive.d.ts +8 -0
- package/transpiled/directives/io/Directive.js +3 -0
- package/transpiled/directives/io/Directive.js.map +1 -0
- package/transpiled/directives/io/IO.d.ts +9 -0
- package/transpiled/directives/io/IO.js +33 -0
- package/transpiled/directives/io/IO.js.map +1 -0
- package/transpiled/directives/io/Input.d.ts +11 -0
- package/transpiled/directives/{octets/Permute.js → io/Input.js} +33 -26
- package/transpiled/directives/io/Input.js.map +1 -0
- package/transpiled/directives/io/Message.d.ts +1 -0
- package/transpiled/directives/io/Message.js +3 -0
- package/transpiled/directives/io/Message.js.map +1 -0
- package/transpiled/directives/io/Output.d.ts +13 -0
- package/transpiled/directives/io/Output.js +76 -0
- package/transpiled/directives/io/Output.js.map +1 -0
- package/transpiled/directives/io/index.d.ts +2 -0
- package/transpiled/directives/io/index.js +6 -0
- package/transpiled/directives/io/index.js.map +1 -0
- package/transpiled/directives/io/schemas.d.ts +7 -0
- package/transpiled/directives/io/schemas.js +14 -0
- package/transpiled/directives/io/schemas.js.map +1 -0
- package/transpiled/directives/octets/Context.d.ts +3 -3
- package/transpiled/directives/octets/Context.js +4 -2
- package/transpiled/directives/octets/Context.js.map +1 -1
- package/transpiled/directives/octets/Delete.d.ts +3 -2
- package/transpiled/directives/octets/Delete.js +3 -1
- package/transpiled/directives/octets/Delete.js.map +1 -1
- package/transpiled/directives/octets/Directive.d.ts +8 -0
- package/transpiled/directives/octets/Directive.js +8 -0
- package/transpiled/directives/octets/Directive.js.map +1 -0
- package/transpiled/directives/octets/Fetch.d.ts +3 -2
- package/transpiled/directives/octets/Fetch.js +3 -1
- package/transpiled/directives/octets/Fetch.js.map +1 -1
- package/transpiled/directives/octets/List.d.ts +3 -2
- package/transpiled/directives/octets/List.js +3 -1
- package/transpiled/directives/octets/List.js.map +1 -1
- package/transpiled/directives/octets/Octets.d.ts +4 -4
- package/transpiled/directives/octets/Octets.js +2 -4
- package/transpiled/directives/octets/Octets.js.map +1 -1
- package/transpiled/directives/octets/Store.d.ts +3 -2
- package/transpiled/directives/octets/Store.js +10 -3
- package/transpiled/directives/octets/Store.js.map +1 -1
- package/transpiled/directives/octets/Workflow.d.ts +3 -2
- package/transpiled/directives/octets/Workflow.js +9 -2
- package/transpiled/directives/octets/Workflow.js.map +1 -1
- package/transpiled/directives/octets/types.d.ts +0 -5
- package/transpiled/directives/require/Directive.d.ts +4 -0
- package/transpiled/directives/require/Directive.js +3 -0
- package/transpiled/directives/require/Directive.js.map +1 -0
- package/transpiled/directives/require/Headers.d.ts +7 -0
- package/transpiled/directives/require/Headers.js +19 -0
- package/transpiled/directives/require/Headers.js.map +1 -0
- package/transpiled/directives/require/Require.d.ts +9 -0
- package/transpiled/directives/require/Require.js +27 -0
- package/transpiled/directives/require/Require.js.map +1 -0
- package/transpiled/directives/require/index.d.ts +2 -0
- package/transpiled/directives/require/index.js +6 -0
- package/transpiled/directives/require/index.js.map +1 -0
- package/transpiled/directives/vary/Directive.d.ts +2 -1
- package/transpiled/directives/vary/Embed.d.ts +2 -1
- package/transpiled/directives/vary/Embed.js +8 -6
- package/transpiled/directives/vary/Embed.js.map +1 -1
- package/transpiled/directives/vary/Vary.d.ts +3 -3
- package/transpiled/directives/vary/Vary.js +3 -3
- package/transpiled/directives/vary/Vary.js.map +1 -1
- package/transpiled/directives/vary/embeddings/Authority.d.ts +5 -0
- package/transpiled/directives/vary/embeddings/Authority.js +10 -0
- package/transpiled/directives/vary/embeddings/Authority.js.map +1 -0
- package/transpiled/directives/vary/embeddings/Embedding.d.ts +2 -1
- package/transpiled/directives/vary/embeddings/Header.js +8 -6
- package/transpiled/directives/vary/embeddings/Header.js.map +1 -1
- package/transpiled/directives/vary/embeddings/Language.js +1 -1
- package/transpiled/directives/vary/embeddings/Language.js.map +1 -1
- package/transpiled/directives/vary/embeddings/Parameter.d.ts +7 -0
- package/transpiled/directives/vary/embeddings/Parameter.js +14 -0
- package/transpiled/directives/vary/embeddings/Parameter.js.map +1 -0
- package/transpiled/directives/vary/embeddings/index.d.ts +2 -2
- package/transpiled/directives/vary/embeddings/index.js +8 -4
- package/transpiled/directives/vary/embeddings/index.js.map +1 -1
- package/transpiled/exceptions.d.ts +3 -2
- package/transpiled/exceptions.js +13 -7
- package/transpiled/exceptions.js.map +1 -1
- package/transpiled/root.js +5 -0
- package/transpiled/root.js.map +1 -1
- package/transpiled/schemas.d.ts +1 -1
- package/transpiled/schemas.js +2 -2
- package/transpiled/schemas.js.map +1 -1
- package/transpiled/tsconfig.tsbuildinfo +1 -1
- package/components/identity.basic/operations/create.d.ts +0 -10
- package/components/identity.basic/operations/create.js +0 -10
- package/components/identity.basic/operations/create.js.map +0 -1
- package/components/identity.basic/source/create.ts +0 -18
- package/components/identity.federation/operations/create.d.ts +0 -10
- package/components/identity.federation/operations/create.js.map +0 -1
- package/components/identity.federation/operations/schemas.d.ts +0 -59
- package/components/identity.federation/operations/schemas.js +0 -9
- package/components/identity.federation/operations/schemas.js.map +0 -1
- package/components/identity.federation/operations/types.js.map +0 -1
- package/components/identity.federation/source/schemas.ts +0 -61
- package/components/octets.storage/operations/permute.js +0 -7
- package/source/HTTP/Server.test.ts +0 -126
- package/source/directives/octets/Permute.ts +0 -43
- package/transpiled/directives/octets/Permute.d.ts +0 -10
- package/transpiled/directives/octets/Permute.js.map +0 -1
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
@security
|
|
2
|
+
Feature: IO restrictions
|
|
3
|
+
|
|
4
|
+
Background:
|
|
5
|
+
Given the `pots` database contains:
|
|
6
|
+
| _id | title | volume | temperature |
|
|
7
|
+
| 4c4759e6f9c74da989d64511df42d6f4 | First pot | 100 | 80 |
|
|
8
|
+
| 99988d785d7d445cad45dbf8531f560b | Second pot | 200 | 30 |
|
|
9
|
+
|
|
10
|
+
Scenario: Output is omitted by default
|
|
11
|
+
Given the `pots` is running with the following manifest:
|
|
12
|
+
"""yaml
|
|
13
|
+
exposition:
|
|
14
|
+
/:
|
|
15
|
+
GET: enumerate
|
|
16
|
+
/:id:
|
|
17
|
+
GET: observe
|
|
18
|
+
"""
|
|
19
|
+
When the following request is received:
|
|
20
|
+
"""
|
|
21
|
+
GET /pots/4c4759e6f9c74da989d64511df42d6f4/ HTTP/1.1
|
|
22
|
+
host: nex.toa.io
|
|
23
|
+
"""
|
|
24
|
+
Then the following reply is sent:
|
|
25
|
+
"""
|
|
26
|
+
200 OK
|
|
27
|
+
content-length: 0
|
|
28
|
+
"""
|
|
29
|
+
When the following request is received:
|
|
30
|
+
"""
|
|
31
|
+
GET /pots/ HTTP/1.1
|
|
32
|
+
host: nex.toa.io
|
|
33
|
+
accept: application/yaml
|
|
34
|
+
"""
|
|
35
|
+
Then the following reply is sent:
|
|
36
|
+
"""
|
|
37
|
+
200 OK
|
|
38
|
+
content-length: 0
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
Scenario: Output is omitted by intention
|
|
42
|
+
Given the `pots` is running with the following manifest:
|
|
43
|
+
"""yaml
|
|
44
|
+
exposition:
|
|
45
|
+
/:id:
|
|
46
|
+
io:output: false
|
|
47
|
+
GET: observe
|
|
48
|
+
"""
|
|
49
|
+
When the following request is received:
|
|
50
|
+
"""
|
|
51
|
+
GET /pots/4c4759e6f9c74da989d64511df42d6f4/ HTTP/1.1
|
|
52
|
+
host: nex.toa.io
|
|
53
|
+
accept: application/yaml
|
|
54
|
+
"""
|
|
55
|
+
Then the following reply is sent:
|
|
56
|
+
"""
|
|
57
|
+
200 OK
|
|
58
|
+
content-length: 0
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
Scenario: Output permissions
|
|
62
|
+
Given the `pots` is running with the following manifest:
|
|
63
|
+
"""yaml
|
|
64
|
+
exposition:
|
|
65
|
+
/:
|
|
66
|
+
io:output: [id, volume]
|
|
67
|
+
GET: enumerate
|
|
68
|
+
/:id:
|
|
69
|
+
GET: observe
|
|
70
|
+
"""
|
|
71
|
+
When the following request is received:
|
|
72
|
+
"""
|
|
73
|
+
GET /pots/4c4759e6f9c74da989d64511df42d6f4/ HTTP/1.1
|
|
74
|
+
host: nex.toa.io
|
|
75
|
+
accept: application/yaml
|
|
76
|
+
"""
|
|
77
|
+
Then the following reply is sent:
|
|
78
|
+
"""
|
|
79
|
+
200 OK
|
|
80
|
+
|
|
81
|
+
id: 4c4759e6f9c74da989d64511df42d6f4
|
|
82
|
+
volume: 100
|
|
83
|
+
"""
|
|
84
|
+
And the reply does not contain:
|
|
85
|
+
"""
|
|
86
|
+
title:
|
|
87
|
+
temperature:
|
|
88
|
+
"""
|
|
89
|
+
When the following request is received:
|
|
90
|
+
"""
|
|
91
|
+
GET /pots/ HTTP/1.1
|
|
92
|
+
host: nex.toa.io
|
|
93
|
+
accept: application/yaml
|
|
94
|
+
"""
|
|
95
|
+
Then the following reply is sent:
|
|
96
|
+
"""
|
|
97
|
+
200 OK
|
|
98
|
+
content-type: application/yaml
|
|
99
|
+
|
|
100
|
+
- id: 4c4759e6f9c74da989d64511df42d6f4
|
|
101
|
+
volume: 100
|
|
102
|
+
- id: 99988d785d7d445cad45dbf8531f560b
|
|
103
|
+
volume: 200
|
|
104
|
+
"""
|
|
105
|
+
And the reply does not contain:
|
|
106
|
+
"""
|
|
107
|
+
title:
|
|
108
|
+
temperature:
|
|
109
|
+
"""
|
|
110
|
+
|
|
111
|
+
Scenario: Input is unrestricted by default
|
|
112
|
+
Given the `pots` is running with the following manifest:
|
|
113
|
+
"""yaml
|
|
114
|
+
exposition:
|
|
115
|
+
/:
|
|
116
|
+
io:output: true
|
|
117
|
+
POST: create
|
|
118
|
+
"""
|
|
119
|
+
When the following request is received:
|
|
120
|
+
"""
|
|
121
|
+
POST /pots/ HTTP/1.1
|
|
122
|
+
host: nex.toa.io
|
|
123
|
+
accept: application/yaml
|
|
124
|
+
content-type: application/yaml
|
|
125
|
+
|
|
126
|
+
title: Hello
|
|
127
|
+
volume: 1.5
|
|
128
|
+
temperature: 80
|
|
129
|
+
"""
|
|
130
|
+
Then the following reply is sent:
|
|
131
|
+
"""
|
|
132
|
+
201 Created
|
|
133
|
+
|
|
134
|
+
title: Hello
|
|
135
|
+
volume: 1.5
|
|
136
|
+
temperature: 80
|
|
137
|
+
"""
|
|
138
|
+
|
|
139
|
+
Scenario: Input permissions
|
|
140
|
+
Given the `pots` is running with the following manifest:
|
|
141
|
+
"""yaml
|
|
142
|
+
exposition:
|
|
143
|
+
/:
|
|
144
|
+
io:input: [title, volume]
|
|
145
|
+
io:output: [id]
|
|
146
|
+
POST: create
|
|
147
|
+
"""
|
|
148
|
+
When the following request is received:
|
|
149
|
+
"""
|
|
150
|
+
POST /pots/ HTTP/1.1
|
|
151
|
+
host: nex.toa.io
|
|
152
|
+
accept: text/plain
|
|
153
|
+
content-type: application/yaml
|
|
154
|
+
|
|
155
|
+
title: Hello
|
|
156
|
+
volume: 1.5
|
|
157
|
+
temperature: 80
|
|
158
|
+
"""
|
|
159
|
+
Then the following reply is sent:
|
|
160
|
+
"""
|
|
161
|
+
400 Bad Request
|
|
162
|
+
|
|
163
|
+
Unexpected input: temperature
|
|
164
|
+
"""
|
|
165
|
+
When the following request is received:
|
|
166
|
+
"""
|
|
167
|
+
POST /pots/ HTTP/1.1
|
|
168
|
+
host: nex.toa.io
|
|
169
|
+
content-type: application/yaml
|
|
170
|
+
|
|
171
|
+
title: Hello
|
|
172
|
+
volume: 1.5
|
|
173
|
+
"""
|
|
174
|
+
Then the following reply is sent:
|
|
175
|
+
"""
|
|
176
|
+
201 Created
|
|
177
|
+
"""
|
|
178
|
+
|
|
179
|
+
Scenario: IO shortcuts
|
|
180
|
+
Given the `pots` is running with the following manifest:
|
|
181
|
+
"""yaml
|
|
182
|
+
exposition:
|
|
183
|
+
/:
|
|
184
|
+
input: [title, volume]
|
|
185
|
+
output: [id, title, volume]
|
|
186
|
+
POST: create
|
|
187
|
+
"""
|
|
188
|
+
When the following request is received:
|
|
189
|
+
"""
|
|
190
|
+
POST /pots/ HTTP/1.1
|
|
191
|
+
host: nex.toa.io
|
|
192
|
+
accept: application/yaml
|
|
193
|
+
content-type: application/yaml
|
|
194
|
+
|
|
195
|
+
title: Hello
|
|
196
|
+
volume: 1.5
|
|
197
|
+
"""
|
|
198
|
+
Then the following reply is sent:
|
|
199
|
+
"""
|
|
200
|
+
201 Created
|
|
201
|
+
|
|
202
|
+
id:
|
|
203
|
+
title: Hello
|
|
204
|
+
volume: 1.5
|
|
205
|
+
"""
|
|
@@ -4,6 +4,7 @@ Feature: Accessing entries
|
|
|
4
4
|
Given the annotation:
|
|
5
5
|
"""yaml
|
|
6
6
|
/:
|
|
7
|
+
io:output: true
|
|
7
8
|
auth:anonymous: true
|
|
8
9
|
octets:context: octets
|
|
9
10
|
POST:
|
|
@@ -17,6 +18,7 @@ Feature: Accessing entries
|
|
|
17
18
|
When the stream of `lenna.ascii` is received with the following headers:
|
|
18
19
|
"""
|
|
19
20
|
POST / HTTP/1.1
|
|
21
|
+
host: nex.toa.io
|
|
20
22
|
content-type: application/octet-stream
|
|
21
23
|
"""
|
|
22
24
|
Then the following reply is sent:
|
|
@@ -26,6 +28,7 @@ Feature: Accessing entries
|
|
|
26
28
|
When the following request is received:
|
|
27
29
|
"""
|
|
28
30
|
GET / HTTP/1.1
|
|
31
|
+
host: nex.toa.io
|
|
29
32
|
accept: application/vnd.toa.octets.entries+yaml
|
|
30
33
|
"""
|
|
31
34
|
Then the following reply is sent:
|
|
@@ -37,6 +40,7 @@ Feature: Accessing entries
|
|
|
37
40
|
When the following request is received:
|
|
38
41
|
"""
|
|
39
42
|
GET /10cf16b458f759e0d617f2f3d83599ff HTTP/1.1
|
|
43
|
+
host: nex.toa.io
|
|
40
44
|
accept: text/vnd.toa.octets.entry+plain
|
|
41
45
|
"""
|
|
42
46
|
Then the following reply is sent:
|
|
@@ -50,6 +54,7 @@ Feature: Accessing entries
|
|
|
50
54
|
Given the annotation:
|
|
51
55
|
"""yaml
|
|
52
56
|
/:
|
|
57
|
+
io:output: true
|
|
53
58
|
auth:anonymous: true
|
|
54
59
|
octets:context: octets
|
|
55
60
|
POST:
|
|
@@ -65,18 +70,21 @@ Feature: Accessing entries
|
|
|
65
70
|
When the stream of `lenna.ascii` is received with the following headers:
|
|
66
71
|
"""
|
|
67
72
|
POST / HTTP/1.1
|
|
73
|
+
host: nex.toa.io
|
|
68
74
|
accept: application/yaml
|
|
69
75
|
content-type: application/octet-stream
|
|
70
76
|
"""
|
|
71
77
|
And the stream of `lenna.png` is received with the following headers:
|
|
72
78
|
"""
|
|
73
79
|
POST / HTTP/1.1
|
|
80
|
+
host: nex.toa.io
|
|
74
81
|
accept: application/yaml
|
|
75
82
|
content-type: application/octet-stream
|
|
76
83
|
"""
|
|
77
84
|
When the following request is received:
|
|
78
85
|
"""
|
|
79
86
|
GET / HTTP/1.1
|
|
87
|
+
host: nex.toa.io
|
|
80
88
|
accept: application/yaml
|
|
81
89
|
"""
|
|
82
90
|
Then the following reply is sent:
|
|
@@ -90,6 +98,7 @@ Feature: Accessing entries
|
|
|
90
98
|
When the following request is received:
|
|
91
99
|
"""
|
|
92
100
|
GET / HTTP/1.1
|
|
101
|
+
host: nex.toa.io
|
|
93
102
|
accept: application/vnd.toa.octets.entries+yaml
|
|
94
103
|
"""
|
|
95
104
|
Then the following reply is sent:
|
|
@@ -107,6 +116,7 @@ Feature: Accessing entries
|
|
|
107
116
|
When the following request is received:
|
|
108
117
|
"""
|
|
109
118
|
GET /10cf16b458f759e0d617f2f3d83599ff HTTP/1.1
|
|
119
|
+
host: nex.toa.io
|
|
110
120
|
accept: application/vnd.toa.octets.entry+yaml
|
|
111
121
|
"""
|
|
112
122
|
Then the following reply is sent:
|
package/features/octets.feature
CHANGED
|
@@ -4,14 +4,13 @@ Feature: Octets directive family
|
|
|
4
4
|
Given the annotation:
|
|
5
5
|
"""yaml
|
|
6
6
|
/:
|
|
7
|
+
io:output: true
|
|
7
8
|
auth:anonymous: true
|
|
8
9
|
octets:context: octets
|
|
9
10
|
POST:
|
|
10
11
|
octets:store: ~
|
|
11
12
|
GET:
|
|
12
13
|
octets:list: ~
|
|
13
|
-
PUT:
|
|
14
|
-
octets:permute: ~
|
|
15
14
|
/*:
|
|
16
15
|
GET:
|
|
17
16
|
octets:fetch: ~
|
|
@@ -32,12 +31,16 @@ Feature: Octets directive family
|
|
|
32
31
|
POST:
|
|
33
32
|
octets:store:
|
|
34
33
|
accept: image/*
|
|
34
|
+
/*:
|
|
35
|
+
GET:
|
|
36
|
+
octets:fetch: ~
|
|
35
37
|
"""
|
|
36
38
|
|
|
37
39
|
Scenario: Basic storage operations
|
|
38
40
|
When the stream of `lenna.ascii` is received with the following headers:
|
|
39
41
|
"""
|
|
40
42
|
POST / HTTP/1.1
|
|
43
|
+
host: nex.toa.io
|
|
41
44
|
accept: application/yaml
|
|
42
45
|
content-type: application/octet-stream
|
|
43
46
|
"""
|
|
@@ -53,6 +56,7 @@ Feature: Octets directive family
|
|
|
53
56
|
When the following request is received:
|
|
54
57
|
"""
|
|
55
58
|
GET /10cf16b458f759e0d617f2f3d83599ff HTTP/1.1
|
|
59
|
+
host: nex.toa.io
|
|
56
60
|
"""
|
|
57
61
|
Then the stream equals to `lenna.ascii` is sent with the following headers:
|
|
58
62
|
"""
|
|
@@ -64,6 +68,7 @@ Feature: Octets directive family
|
|
|
64
68
|
When the following request is received:
|
|
65
69
|
"""
|
|
66
70
|
GET /10cf16b458f759e0d617f2f3d83599ff HTTP/1.1
|
|
71
|
+
host: nex.toa.io
|
|
67
72
|
if-none-match: ${{ ETAG }}
|
|
68
73
|
"""
|
|
69
74
|
Then the following reply is sent:
|
|
@@ -73,6 +78,7 @@ Feature: Octets directive family
|
|
|
73
78
|
When the following request is received:
|
|
74
79
|
"""
|
|
75
80
|
GET / HTTP/1.1
|
|
81
|
+
host: nex.toa.io
|
|
76
82
|
accept: application/yaml
|
|
77
83
|
"""
|
|
78
84
|
Then the following reply is sent:
|
|
@@ -85,6 +91,7 @@ Feature: Octets directive family
|
|
|
85
91
|
When the following request is received:
|
|
86
92
|
"""
|
|
87
93
|
GET /10cf16b458f759e0d617f2f3d83599ff?foo=bar HTTP/1.1
|
|
94
|
+
host: nex.toa.io
|
|
88
95
|
"""
|
|
89
96
|
Then the following reply is sent:
|
|
90
97
|
"""
|
|
@@ -93,6 +100,7 @@ Feature: Octets directive family
|
|
|
93
100
|
When the following request is received:
|
|
94
101
|
"""
|
|
95
102
|
DELETE /10cf16b458f759e0d617f2f3d83599ff HTTP/1.1
|
|
103
|
+
host: nex.toa.io
|
|
96
104
|
"""
|
|
97
105
|
Then the following reply is sent:
|
|
98
106
|
"""
|
|
@@ -101,68 +109,18 @@ Feature: Octets directive family
|
|
|
101
109
|
When the following request is received:
|
|
102
110
|
"""
|
|
103
111
|
GET /10cf16b458f759e0d617f2f3d83599ff HTTP/1.1
|
|
112
|
+
host: nex.toa.io
|
|
104
113
|
"""
|
|
105
114
|
Then the following reply is sent:
|
|
106
115
|
"""
|
|
107
116
|
404 Not Found
|
|
108
117
|
"""
|
|
109
118
|
|
|
110
|
-
Scenario: Entries permutation
|
|
111
|
-
When the stream of `lenna.ascii` is received with the following headers:
|
|
112
|
-
"""
|
|
113
|
-
POST / HTTP/1.1
|
|
114
|
-
accept: application/yaml
|
|
115
|
-
content-type: application/octet-stream
|
|
116
|
-
"""
|
|
117
|
-
And the stream of `lenna.png` is received with the following headers:
|
|
118
|
-
"""
|
|
119
|
-
POST / HTTP/1.1
|
|
120
|
-
accept: application/yaml
|
|
121
|
-
content-type: application/octet-stream
|
|
122
|
-
"""
|
|
123
|
-
When the following request is received:
|
|
124
|
-
"""
|
|
125
|
-
GET / HTTP/1.1
|
|
126
|
-
accept: application/yaml
|
|
127
|
-
"""
|
|
128
|
-
Then the following reply is sent:
|
|
129
|
-
"""
|
|
130
|
-
200 OK
|
|
131
|
-
content-type: application/yaml
|
|
132
|
-
|
|
133
|
-
- 10cf16b458f759e0d617f2f3d83599ff
|
|
134
|
-
- 814a0034f5549e957ee61360d87457e5
|
|
135
|
-
"""
|
|
136
|
-
When the following request is received:
|
|
137
|
-
"""
|
|
138
|
-
PUT / HTTP/1.1
|
|
139
|
-
content-type: application/yaml
|
|
140
|
-
|
|
141
|
-
- 814a0034f5549e957ee61360d87457e5
|
|
142
|
-
- 10cf16b458f759e0d617f2f3d83599ff
|
|
143
|
-
"""
|
|
144
|
-
Then the following reply is sent:
|
|
145
|
-
"""
|
|
146
|
-
204 No Content
|
|
147
|
-
"""
|
|
148
|
-
When the following request is received:
|
|
149
|
-
"""
|
|
150
|
-
GET / HTTP/1.1
|
|
151
|
-
accept: application/yaml
|
|
152
|
-
"""
|
|
153
|
-
Then the following reply is sent:
|
|
154
|
-
"""
|
|
155
|
-
200 OK
|
|
156
|
-
content-type: application/yaml
|
|
157
|
-
|
|
158
|
-
- 814a0034f5549e957ee61360d87457e5
|
|
159
|
-
- 10cf16b458f759e0d617f2f3d83599ff
|
|
160
|
-
"""
|
|
161
|
-
|
|
162
119
|
Scenario: Media type control
|
|
163
120
|
When the stream of `lenna.png` is received with the following headers:
|
|
164
121
|
"""
|
|
165
122
|
POST /media/jpeg-or-png/ HTTP/1.1
|
|
123
|
+
host: nex.toa.io
|
|
166
124
|
content-type: image/jpeg
|
|
167
125
|
"""
|
|
168
126
|
Then the following reply is sent:
|
|
@@ -172,6 +130,7 @@ Feature: Octets directive family
|
|
|
172
130
|
When the stream of `lenna.png` is received with the following headers:
|
|
173
131
|
"""
|
|
174
132
|
POST /media/jpeg/ HTTP/1.1
|
|
133
|
+
host: nex.toa.io
|
|
175
134
|
"""
|
|
176
135
|
Then the following reply is sent:
|
|
177
136
|
"""
|
|
@@ -180,34 +139,66 @@ Feature: Octets directive family
|
|
|
180
139
|
When the stream of `lenna.png` is received with the following headers:
|
|
181
140
|
"""
|
|
182
141
|
POST /media/jpeg-or-png/ HTTP/1.1
|
|
142
|
+
host: nex.toa.io
|
|
183
143
|
"""
|
|
184
144
|
Then the following reply is sent:
|
|
185
145
|
"""
|
|
186
146
|
201 Created
|
|
187
147
|
"""
|
|
188
148
|
|
|
189
|
-
Scenario Outline:
|
|
190
|
-
When the stream of `sample.<
|
|
149
|
+
Scenario Outline: Detecting `<type>`
|
|
150
|
+
When the stream of `sample.<ext>` is received with the following headers:
|
|
191
151
|
"""
|
|
192
152
|
POST /media/images/ HTTP/1.1
|
|
153
|
+
host: nex.toa.io
|
|
154
|
+
accept: application/yaml
|
|
193
155
|
"""
|
|
194
156
|
Then the following reply is sent:
|
|
195
157
|
"""
|
|
196
158
|
201 Created
|
|
159
|
+
|
|
160
|
+
type: <type>
|
|
197
161
|
"""
|
|
198
162
|
Examples:
|
|
199
|
-
|
|
|
200
|
-
| jpeg
|
|
201
|
-
| jxl
|
|
202
|
-
| gif
|
|
203
|
-
| heic
|
|
204
|
-
| avif
|
|
205
|
-
| webp
|
|
163
|
+
| ext | type |
|
|
164
|
+
| jpeg | image/jpeg |
|
|
165
|
+
| jxl | image/jxl |
|
|
166
|
+
| gif | image/gif |
|
|
167
|
+
| heic | image/heic |
|
|
168
|
+
| avif | image/avif |
|
|
169
|
+
| webp | image/webp |
|
|
170
|
+
|
|
171
|
+
Scenario: Accepting `image/svg+xml`
|
|
172
|
+
When the stream of `sample.svg` is received with the following headers:
|
|
173
|
+
"""
|
|
174
|
+
POST /media/images/ HTTP/1.1
|
|
175
|
+
host: nex.toa.io
|
|
176
|
+
content-type: image/svg+xml
|
|
177
|
+
accept: application/yaml
|
|
178
|
+
"""
|
|
179
|
+
Then the following reply is sent:
|
|
180
|
+
"""
|
|
181
|
+
201 Created
|
|
182
|
+
|
|
183
|
+
type: image/svg+xml
|
|
184
|
+
"""
|
|
185
|
+
|
|
186
|
+
Scenario: Rejection video/avi
|
|
187
|
+
When the stream of `sample.avi` is received with the following headers:
|
|
188
|
+
"""
|
|
189
|
+
POST /media/images/ HTTP/1.1
|
|
190
|
+
host: nex.toa.io
|
|
191
|
+
"""
|
|
192
|
+
Then the following reply is sent:
|
|
193
|
+
"""
|
|
194
|
+
415 Unsupported Media Type
|
|
195
|
+
"""
|
|
206
196
|
|
|
207
197
|
Scenario: Fetching non-existent BLOB
|
|
208
198
|
When the following request is received:
|
|
209
199
|
"""
|
|
210
200
|
GET /whatever HTTP/1.1
|
|
201
|
+
host: nex.toa.io
|
|
211
202
|
"""
|
|
212
203
|
Then the following reply is sent:
|
|
213
204
|
"""
|
|
@@ -218,12 +209,14 @@ Feature: Octets directive family
|
|
|
218
209
|
When the stream of `lenna.ascii` is received with the following headers:
|
|
219
210
|
"""
|
|
220
211
|
POST / HTTP/1.1
|
|
212
|
+
host: nex.toa.io
|
|
221
213
|
accept: application/yaml
|
|
222
214
|
content-type: application/octet-stream
|
|
223
215
|
"""
|
|
224
216
|
And the following request is received:
|
|
225
217
|
"""
|
|
226
218
|
GET /10cf16b458f759e0d617f2f3d83599ff/ HTTP/1.1
|
|
219
|
+
host: nex.toa.io
|
|
227
220
|
accept: text/plain
|
|
228
221
|
"""
|
|
229
222
|
Then the following reply is sent:
|
|
@@ -234,10 +227,11 @@ Feature: Octets directive family
|
|
|
234
227
|
Trailing slash is redundant.
|
|
235
228
|
"""
|
|
236
229
|
|
|
237
|
-
Scenario: Original
|
|
230
|
+
Scenario: Original BLOB is not accessible
|
|
238
231
|
Given the annotation:
|
|
239
232
|
"""yaml
|
|
240
233
|
/:
|
|
234
|
+
io:output: true
|
|
241
235
|
auth:anonymous: true
|
|
242
236
|
octets:context: octets
|
|
243
237
|
POST:
|
|
@@ -251,6 +245,7 @@ Feature: Octets directive family
|
|
|
251
245
|
When the stream of `lenna.ascii` is received with the following headers:
|
|
252
246
|
"""
|
|
253
247
|
POST / HTTP/1.1
|
|
248
|
+
host: nex.toa.io
|
|
254
249
|
"""
|
|
255
250
|
Then the following reply is sent:
|
|
256
251
|
"""
|
|
@@ -259,6 +254,7 @@ Feature: Octets directive family
|
|
|
259
254
|
When the following request is received:
|
|
260
255
|
"""
|
|
261
256
|
GET /10cf16b458f759e0d617f2f3d83599ff HTTP/1.1
|
|
257
|
+
host: nex.toa.io
|
|
262
258
|
accept: text/plain
|
|
263
259
|
"""
|
|
264
260
|
Then the following reply is sent:
|
|
@@ -5,6 +5,7 @@ Feature: Octets `content-meta` header
|
|
|
5
5
|
And the annotation:
|
|
6
6
|
"""yaml
|
|
7
7
|
/:
|
|
8
|
+
io:output: true
|
|
8
9
|
auth:anonymous: true
|
|
9
10
|
octets:context: octets
|
|
10
11
|
/*:
|
|
@@ -18,6 +19,7 @@ Feature: Octets `content-meta` header
|
|
|
18
19
|
When the stream of `lenna.ascii` is received with the following headers:
|
|
19
20
|
"""
|
|
20
21
|
POST /meta-header/ HTTP/1.1
|
|
22
|
+
host: nex.toa.io
|
|
21
23
|
content-type: application/octet-stream
|
|
22
24
|
content-meta: foo, bar=baz=1
|
|
23
25
|
content-meta: baz=1
|
|
@@ -29,6 +31,7 @@ Feature: Octets `content-meta` header
|
|
|
29
31
|
When the following request is received:
|
|
30
32
|
"""
|
|
31
33
|
GET /meta-header/10cf16b458f759e0d617f2f3d83599ff HTTP/1.1
|
|
34
|
+
host: nex.toa.io
|
|
32
35
|
accept: application/vnd.toa.octets.entry+yaml
|
|
33
36
|
"""
|
|
34
37
|
Then the following reply is sent:
|
|
@@ -55,11 +58,12 @@ Feature: Octets `content-meta` header
|
|
|
55
58
|
When the following request is received:
|
|
56
59
|
"""
|
|
57
60
|
OPTIONS / HTTP/1.1
|
|
58
|
-
|
|
61
|
+
host: nex.toa.io
|
|
62
|
+
origin: https://example.com
|
|
59
63
|
"""
|
|
60
64
|
Then the following reply is sent:
|
|
61
65
|
"""
|
|
62
66
|
204 No Content
|
|
63
|
-
access-control-allow-origin:
|
|
64
|
-
access-control-allow-headers: accept, authorization, content-type, content-meta
|
|
67
|
+
access-control-allow-origin: https://example.com
|
|
68
|
+
access-control-allow-headers: accept, authorization, content-type, etag, if-match, if-none-match, content-meta
|
|
65
69
|
"""
|
|
@@ -15,6 +15,7 @@ Feature: Octets storage workflows
|
|
|
15
15
|
- add-baz: octets.tester.baz
|
|
16
16
|
- diversify: octets.tester.diversify
|
|
17
17
|
/*:
|
|
18
|
+
io:output: true
|
|
18
19
|
GET:
|
|
19
20
|
octets:fetch:
|
|
20
21
|
meta: true
|
|
@@ -22,6 +23,7 @@ Feature: Octets storage workflows
|
|
|
22
23
|
When the stream of `lenna.ascii` is received with the following headers:
|
|
23
24
|
"""
|
|
24
25
|
POST / HTTP/1.1
|
|
26
|
+
host: nex.toa.io
|
|
25
27
|
accept: application/yaml
|
|
26
28
|
content-type: application/octet-stream
|
|
27
29
|
"""
|
|
@@ -48,6 +50,7 @@ Feature: Octets storage workflows
|
|
|
48
50
|
When the following request is received:
|
|
49
51
|
"""
|
|
50
52
|
GET /10cf16b458f759e0d617f2f3d83599ff HTTP/1.1
|
|
53
|
+
host: nex.toa.io
|
|
51
54
|
accept: application/vnd.toa.octets.entry+yaml
|
|
52
55
|
"""
|
|
53
56
|
Then the following reply is sent:
|
|
@@ -66,6 +69,7 @@ Feature: Octets storage workflows
|
|
|
66
69
|
When the following request is received:
|
|
67
70
|
"""
|
|
68
71
|
GET /10cf16b458f759e0d617f2f3d83599ff.hello.png HTTP/1.1
|
|
72
|
+
host: nex.toa.io
|
|
69
73
|
"""
|
|
70
74
|
Then the stream equals to `lenna.png` is sent with the following headers:
|
|
71
75
|
"""
|
|
@@ -91,6 +95,7 @@ Feature: Octets storage workflows
|
|
|
91
95
|
When the stream of `lenna.ascii` is received with the following headers:
|
|
92
96
|
"""
|
|
93
97
|
POST / HTTP/1.1
|
|
98
|
+
host: nex.toa.io
|
|
94
99
|
accept: application/yaml
|
|
95
100
|
content-type: application/octet-stream
|
|
96
101
|
"""
|
|
@@ -133,6 +138,7 @@ Feature: Octets storage workflows
|
|
|
133
138
|
When the stream of `lenna.ascii` is received with the following headers:
|
|
134
139
|
"""
|
|
135
140
|
POST / HTTP/1.1
|
|
141
|
+
host: nex.toa.io
|
|
136
142
|
content-type: application/octet-stream
|
|
137
143
|
"""
|
|
138
144
|
Then the following reply is sent:
|
|
@@ -142,6 +148,7 @@ Feature: Octets storage workflows
|
|
|
142
148
|
When the following request is received:
|
|
143
149
|
"""
|
|
144
150
|
DELETE /10cf16b458f759e0d617f2f3d83599ff HTTP/1.1
|
|
151
|
+
host: nex.toa.io
|
|
145
152
|
accept: application/yaml
|
|
146
153
|
"""
|
|
147
154
|
Then the following reply is sent:
|
|
@@ -156,6 +163,7 @@ Feature: Octets storage workflows
|
|
|
156
163
|
When the following request is received:
|
|
157
164
|
"""
|
|
158
165
|
GET /10cf16b458f759e0d617f2f3d83599ff HTTP/1.1
|
|
166
|
+
host: nex.toa.io
|
|
159
167
|
"""
|
|
160
168
|
Then the following reply is sent:
|
|
161
169
|
"""
|
|
@@ -182,6 +190,7 @@ Feature: Octets storage workflows
|
|
|
182
190
|
When the stream of `lenna.ascii` is received with the following headers:
|
|
183
191
|
"""
|
|
184
192
|
POST / HTTP/1.1
|
|
193
|
+
host: nex.toa.io
|
|
185
194
|
content-type: application/octet-stream
|
|
186
195
|
"""
|
|
187
196
|
Then the following reply is sent:
|
|
@@ -191,6 +200,7 @@ Feature: Octets storage workflows
|
|
|
191
200
|
When the following request is received:
|
|
192
201
|
"""
|
|
193
202
|
DELETE /10cf16b458f759e0d617f2f3d83599ff HTTP/1.1
|
|
203
|
+
host: nex.toa.io
|
|
194
204
|
accept: application/yaml
|
|
195
205
|
"""
|
|
196
206
|
Then the following reply is sent:
|
|
@@ -208,6 +218,7 @@ Feature: Octets storage workflows
|
|
|
208
218
|
When the following request is received:
|
|
209
219
|
"""
|
|
210
220
|
GET /10cf16b458f759e0d617f2f3d83599ff HTTP/1.1
|
|
221
|
+
host: nex.toa.io
|
|
211
222
|
"""
|
|
212
223
|
Then the following reply is sent:
|
|
213
224
|
"""
|
|
@@ -230,6 +241,7 @@ Feature: Octets storage workflows
|
|
|
230
241
|
When the stream of `lenna.ascii` is received with the following headers:
|
|
231
242
|
"""
|
|
232
243
|
POST /hello/world/ HTTP/1.1
|
|
244
|
+
host: nex.toa.io
|
|
233
245
|
accept: application/yaml
|
|
234
246
|
content-type: application/octet-stream
|
|
235
247
|
"""
|
|
@@ -264,6 +276,7 @@ Feature: Octets storage workflows
|
|
|
264
276
|
When the stream of `lenna.ascii` is received with the following headers:
|
|
265
277
|
"""
|
|
266
278
|
POST / HTTP/1.1
|
|
279
|
+
host: nex.toa.io
|
|
267
280
|
content-type: application/octet-stream
|
|
268
281
|
"""
|
|
269
282
|
Then the following reply is sent:
|
|
@@ -273,6 +286,7 @@ Feature: Octets storage workflows
|
|
|
273
286
|
When the following request is received:
|
|
274
287
|
"""
|
|
275
288
|
DELETE /10cf16b458f759e0d617f2f3d83599ff HTTP/1.1
|
|
289
|
+
host: nex.toa.io
|
|
276
290
|
accept: application/yaml
|
|
277
291
|
"""
|
|
278
292
|
Then the following reply is sent:
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Feature: Probes
|
|
2
|
+
|
|
3
|
+
Scenario: Startup probe
|
|
4
|
+
Given the Gateway is running
|
|
5
|
+
And after 1 second
|
|
6
|
+
When the following request is received:
|
|
7
|
+
"""
|
|
8
|
+
GET /.ready HTTP/1.1
|
|
9
|
+
"""
|
|
10
|
+
Then the following reply is sent:
|
|
11
|
+
"""
|
|
12
|
+
200 OK
|
|
13
|
+
cache-control: no-store
|
|
14
|
+
"""
|