Skip to content

Conversation

@shriramshankar
Copy link
Contributor

@shriramshankar shriramshankar commented Mar 18, 2017

No description provided.

@shriramshankar shriramshankar requested review from annyhe and iamigo March 18, 2017 07:39
@shriramshankar
Copy link
Contributor Author

@annyhe @iamigo PR #292 needs to be merged before this one

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 88.494% when pulling f4f2be9 on prd-realtime-put-patch-delete into 1744e58 on perms-for-upsert-enpoints.

@meynet-salesforce meynet-salesforce temporarily deployed to refocus-pr-294 March 19, 2017 21:58 Inactive
@shriramshankar shriramshankar changed the base branch from perms-for-upsert-enpoints to master March 19, 2017 22:24
@shriramshankar shriramshankar changed the base branch from master to perms-for-upsert-enpoints March 19, 2017 22:24
const aspName = nameParts[1];
const subOpts = {
where: {
absolutePath: subName,
Copy link
Contributor

Choose a reason for hiding this comment

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

case insensitive?

};
const aspOpts = {
where: {
name: aspName,
Copy link
Contributor

Choose a reason for hiding this comment

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

case insensitive?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

aspectName and subjectName are always from the "sample.name" field from the db and the "sample.name" field is formed from its subject and its aspect in the db. So the case always matches when we do the find here.

.catch(done);
});

it('when tried to publish sample without aspect,'+
Copy link
Contributor

Choose a reason for hiding this comment

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

any other tests we can add here to make sure that we aren't breaking any of the existing realtime event publishing?

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 sample object the is finally passed to the real-time emitter should have the following fields/objects to not to break anything

  1. absolutePath - as a field copied over from subject absolutePath
  2. subject object always attached - having tags field
  3. aspect object always attached having tags field
    I have added tests to check for these.

// publish the update event to the redis channel
if (props.publishEvents) {
publisher.publishSample(o, props.associatedModels.subject,

Copy link
Contributor

Choose a reason for hiding this comment

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

is there a reason we are adding an empty line here?

*
* @param {Sample} inst - The newly-created instance
*/
afterCreate(inst /* , opts */) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we test for whether a sample is published on realtime create and delete?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is another story for this.

@meynet-salesforce meynet-salesforce temporarily deployed to refocus-pr-294 March 20, 2017 23:59 Inactive
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 88.494% when pulling ee15788 on prd-realtime-put-patch-delete into 1744e58 on perms-for-upsert-enpoints.

@shriramshankar
Copy link
Contributor Author

@iamigo @annyhe Changes done and PR updated.

@iamigo iamigo changed the title realtime events for put, patch, and delete moved to api layer for sam… move sample realtime events for put/patch/delete to api layer Mar 21, 2017
@shriramshankar
Copy link
Contributor Author

@annyhe Can you merge this PR?

@annyhe annyhe merged commit 28bdd09 into perms-for-upsert-enpoints Mar 22, 2017
@annyhe annyhe deleted the prd-realtime-put-patch-delete branch March 22, 2017 15:56
@shriramshankar shriramshankar restored the prd-realtime-put-patch-delete branch March 22, 2017 21:25
@iamigo iamigo deleted the prd-realtime-put-patch-delete branch January 23, 2019 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants