Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

[N/A] Channel model bugfixing #34

Conversation

bryangaleopenfin
Copy link
Contributor

Fixes more bugs in Channel Model revealed by integration tests

  • A window could be listed as being part of two channels
  • When querying windows in channels, we would return whatever had been passed to us previously rather than a sanitized Identity object

@bryangaleopenfin bryangaleopenfin requested a review from a team April 2, 2019 17:15
@@ -90,14 +90,17 @@ export class ChannelModel {
const previousChannelId = this._identityHashToChannelIdMap.get(identityHash) || GLOBAL_CHANNEL_ID;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're concerned about a bad identity passed here, should we have an identity.name !== undefined check here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the purposes of the prototype, I'm not concerned about bad identities, and that's probably a thing to check outside of this anyway

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sanitizing is more just so that the data we send out is 'clean', and doesn't mean anyone's given us a bad identity. It was primarily motivated to make test-writing easier, but it feels like the the 'right' thing to do anyway

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we'll eventually do the sanitising at the client/APIHandler level, rather than having to put that kind of thing all over the provider.

Doing it here is good for the time being, though.

@bryangaleopenfin bryangaleopenfin requested a review from a team April 3, 2019 09:07
@pjbroadbent pjbroadbent merged commit 875b4b2 into HadoukenIO:develop Apr 3, 2019
@bryangaleopenfin bryangaleopenfin deleted the dev/bryan/channel-model-bugfix branch April 3, 2019 13:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants