Subject: [PATCH] tests: add amqp binding 0.4.0 --- Index: test/ajv-schemes.js IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/test/ajv-schemes.js b/test/ajv-schemes.js --- a/test/ajv-schemes.js (revision defb23697195e2083c33e642244e8870eec32b29) +++ b/test/ajv-schemes.js (date 1727774341860) @@ -7,6 +7,9 @@ ajv.addSchema(require('@bindings/amqp/0.3.0/channel.json')); ajv.addSchema(require('@bindings/amqp/0.3.0/message.json')); ajv.addSchema(require('@bindings/amqp/0.3.0/operation.json')); + ajv.addSchema(require('@bindings/amqp/0.4.0/channel.json')); + ajv.addSchema(require('@bindings/amqp/0.4.0/message.json')); + ajv.addSchema(require('@bindings/amqp/0.4.0/operation.json')); ajv.addSchema(require('@bindings/anypointmq/0.0.1/channel.json')); ajv.addSchema(require('@bindings/anypointmq/0.0.1/message.json')); Index: test/test-helper.mjs IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/test/test-helper.mjs b/test/test-helper.mjs --- a/test/test-helper.mjs (revision defb23697195e2083c33e642244e8870eec32b29) +++ b/test/test-helper.mjs (date 1727774239544) @@ -76,6 +76,7 @@ ; const validationResult = validator(model); + console.log(validator.errors); assert(validationResult === true, `Object MUST be valid`); } Index: test/bindings/amqp/amqp channel binding.test.mjs IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/test/bindings/amqp/amqp channel binding.test.mjs b/test/bindings/amqp/amqp channel binding.test.mjs --- a/test/bindings/amqp/amqp channel binding.test.mjs (revision defb23697195e2083c33e642244e8870eec32b29) +++ b/test/bindings/amqp/amqp channel binding.test.mjs (date 1727774484347) @@ -160,12 +160,100 @@ }, "ext-number": 1 } + ), + "0.4.0": new JsonSchemaTestSuiteData( + require(`@bindings/amqp/0.4.0/channel.json`), + [ + { + "is": "queue", + "queue": { + "name": "my-queue-name", + "durable": true, + "exclusive": true, + "autoDelete": false, + "vhost": "/" + }, + "bindingVersion": "0.4.0" + }, + { + "is": "routingKey", + "exchange": { + "name": "myExchange", + "type": "topic", + "durable": true, + "autoDelete": false, + "vhost": "/" + }, + "bindingVersion": "0.4.0" + }, + { + "is": "routingKey", + "name": "routingKeyName", + "channel": { + "$ref": "#/components/channels/queue-update" + }, + "exchange": { + "name": "myExchange", + "type": "topic", + "durable": true, + "autoDelete": false, + "vhost": "/" + }, + "bindingVersion": "0.4.0" + } + ], + { + "is": "queue", + "queue": { + "name": "my-queue-name", + "durable": true, + "exclusive": true, + "autoDelete": false, + "vhost": "/" + }, + "bindingVersion": "0.4.0" + }, + { + "bindingVersion": "0.4.0" + }, + { + "is": "queue", + "queue": { + "name": "my-queue-name", + "durable": true, + "exclusive": true, + "autoDelete": false, + "vhost": "/" + }, + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + } + }, + { + "is": "queue", + "queue": { + "name": "my-queue-name", + "durable": true, + "exclusive": true, + "autoDelete": false, + "vhost": "/" + }, + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 + } ) } describe.each([ - '0.2.0', - '0.3.0' + // '0.2.0', + // '0.3.0', + '0.4.0', ])('AMQP channel binding v%s', (bindingVersion) => { new JsonSchemaTestSuite(data[bindingVersion], config).testSuite() }) Index: test/bindings/amqp/amqp message binding.test.mjs IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/test/bindings/amqp/amqp message binding.test.mjs b/test/bindings/amqp/amqp message binding.test.mjs --- a/test/bindings/amqp/amqp message binding.test.mjs (revision defb23697195e2083c33e642244e8870eec32b29) +++ b/test/bindings/amqp/amqp message binding.test.mjs (date 1727774099424) @@ -66,12 +66,40 @@ }, "ext-number": 1 } + ), + "0.4.0": new JsonSchemaTestSuiteData( + require(`@bindings/amqp/0.4.0/message.json`), + [ + { + "contentEncoding": "gzip", + "messageType": "user.signup", + "bindingVersion": "0.3.0" + } + ], + {}, + {}, + { + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + } + }, + { + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 + } ) } describe.each([ '0.2.0', - '0.3.0' + '0.3.0', + '0.4.0' ])('AMQP message binding v%s', (bindingVersion) => { new JsonSchemaTestSuite(data[bindingVersion], config).testSuite() }) Index: test/bindings/amqp/amqp operation binding.test.mjs IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/test/bindings/amqp/amqp operation binding.test.mjs b/test/bindings/amqp/amqp operation binding.test.mjs --- a/test/bindings/amqp/amqp operation binding.test.mjs (revision defb23697195e2083c33e642244e8870eec32b29) +++ b/test/bindings/amqp/amqp operation binding.test.mjs (date 1727774099441) @@ -88,12 +88,51 @@ }, "ext-number": 1 } + ), + "0.4.0": new JsonSchemaTestSuiteData( + require(`@bindings/amqp/0.4.0/operation.json`), + [ + { + "expiration": 100000, + "userId": "guest", + "cc": [ + "user.logs" + ], + "priority": 10, + "deliveryMode": 2, + "mandatory": false, + "bcc": [ + "external.audit" + ], + "timestamp": true, + "ack": false, + "bindingVersion": "0.3.0" + } + ], + {}, + {}, + { + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + } + }, + { + "x-number": 0, + "x-string": "", + "x-object": { + "property": {} + }, + "ext-number": 1 + } ) } describe.each([ '0.2.0', - '0.3.0' + '0.3.0', + '0.4.0' ])('AMQP operation binding v%s', (bindingVersion) => { new JsonSchemaTestSuite(data[bindingVersion], config).testSuite() })