This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: PubSub Interop Tests and CLI+HTTP-API Implementation (#1081)
* test: enable pubsub tests * fix: generate meaniful error when pubsub is called and not enabled * test: enable pubsub for factory daemon * test: enable pubsub tests * fix: generate meaniful error when pubsub is called and not enabled * test: enable pubsub for factory daemon * fiix(pubsub-subscribe): stop HAPI gzip from buffering our streamed response * test: fix spec/pubsub * fix: lint errors * test: tests js/go pubsub interop * test: pubsub interop tests * test: enable pubsub tests * fix: generate meaniful error when pubsub is called and not enabled * test: enable pubsub for factory daemon * fiix(pubsub-subscribe): stop HAPI gzip from buffering our streamed response * test: fix spec/pubsub * fix: lint errors * test: tests js/go pubsub interop * test: pubsub interop tests * test: more tests with different data types Note that binary data from JS to GO fails * HTTP API server: parsing query string as binary in pubsub publish * HTTP API: pubsub: publish should fail gracefully when no argument is given * chore: update deps * chore: update deps * last pass
- Loading branch information
1 parent
71faa92
commit 99f0f87
Showing
17 changed files
with
352 additions
and
76 deletions.
There are no files selected for viewing
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
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,24 @@ | ||
'use strict' | ||
|
||
const EventEmitter = require('events') | ||
|
||
function fail () { | ||
throw new Error('The daemon must be run with \'--enable-pubsub-experiment\'') | ||
} | ||
|
||
class NoFloodSub extends EventEmitter { | ||
constructor () { | ||
super() | ||
|
||
this.peers = new Map() | ||
this.subscriptions = new Set() | ||
} | ||
|
||
start (callback) { callback() } | ||
stop (callback) { callback() } | ||
publish () { fail() } | ||
subscribe () { fail() } | ||
unsubscribe () { fail() } | ||
} | ||
|
||
module.exports = NoFloodSub |
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
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
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
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
6 | ||
6 |
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
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
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
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
Oops, something went wrong.