forked from asyncapi/spec-json-schemas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(definitions): Pulsar bindings new tests structure
- Loading branch information
Showing
13 changed files
with
116 additions
and
155 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
test/bindings/pulsar/0.1.0/channel/only required properties.json
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
test/bindings/pulsar/0.1.0/channel/without required properties.json
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
test/bindings/pulsar/0.1.0/server/only required properties.json
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
test/bindings/pulsar/0.1.0/server/without required properties.json
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import { | ||
JsonSchemaTestSuite, | ||
JsonSchemaTestSuiteConfig, | ||
JsonSchemaTestSuiteData | ||
} from '@test/definitions/base-schema-test.mjs'; | ||
import {describe} from 'vitest'; | ||
|
||
const config = new JsonSchemaTestSuiteConfig( | ||
true, | ||
[ | ||
'must have required property \'namespace\'', | ||
'must have required property \'persistence\'', | ||
], | ||
true, | ||
[] | ||
); | ||
|
||
let data = { | ||
"0.1.0": new JsonSchemaTestSuiteData( | ||
require(`@bindings/pulsar/0.1.0/channel.json`), | ||
[ | ||
{ | ||
"namespace": "staging", | ||
"persistence": "persistent", | ||
"compaction": 1000, | ||
"geo-replication": [ | ||
"us-east1", | ||
"us-west1" | ||
], | ||
"retention": { | ||
"time": 7, | ||
"size": 1000 | ||
}, | ||
"ttl": 360, | ||
"deduplication": false | ||
} | ||
], | ||
{ | ||
"namespace": "staging", | ||
"persistence": "persistent" | ||
}, | ||
{}, | ||
{ | ||
"namespace": "staging", | ||
"persistence": "persistent", | ||
"x-number": 0, | ||
"x-string": "", | ||
"x-object": { | ||
"property": {} | ||
} | ||
}, | ||
{ | ||
"namespace": "staging", | ||
"persistence": "persistent", | ||
"x-number": 0, | ||
"x-string": "", | ||
"x-object": { | ||
"property": {} | ||
}, | ||
"ext-number": 1 | ||
} | ||
), | ||
} | ||
|
||
describe.each([ | ||
'0.1.0', | ||
])('Pulsar channel binding v%s', (bindingVersion) => { | ||
new JsonSchemaTestSuite(data[bindingVersion], config).testSuite() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { | ||
JsonSchemaTestSuite, | ||
JsonSchemaTestSuiteConfig, | ||
JsonSchemaTestSuiteData | ||
} from '@test/definitions/base-schema-test.mjs'; | ||
import {describe} from 'vitest'; | ||
|
||
const config = new JsonSchemaTestSuiteConfig( | ||
false, | ||
[], | ||
true, | ||
[] | ||
); | ||
|
||
let data = { | ||
"0.1.0": new JsonSchemaTestSuiteData( | ||
require(`@bindings/pulsar/0.1.0/server.json`), | ||
[ | ||
{ | ||
"tenant": "contoso" | ||
} | ||
], | ||
{}, | ||
{}, | ||
{ | ||
"x-number": 0, | ||
"x-string": "", | ||
"x-object": { | ||
"property": {} | ||
} | ||
}, | ||
{ | ||
"x-number": 0, | ||
"x-string": "", | ||
"x-object": { | ||
"property": {} | ||
}, | ||
"ext-number": 1 | ||
} | ||
), | ||
} | ||
|
||
describe.each([ | ||
'0.1.0', | ||
])('Pulsar server binding v%s', (bindingVersion) => { | ||
new JsonSchemaTestSuite(data[bindingVersion], config).testSuite() | ||
}) |
This file was deleted.
Oops, something went wrong.