Page MenuHomeDevCentral

Add notifications:payload command
ClosedPublic

Authored by dereckson on Aug 19 2016, 10:48.
Tags
None
Referenced Files
F3930791: D617.id1525.diff
Sun, Dec 22, 15:45
Unknown Object (File)
Tue, Dec 17, 11:55
Unknown Object (File)
Sun, Dec 15, 05:16
Unknown Object (File)
Fri, Dec 13, 21:48
Unknown Object (File)
Fri, Dec 13, 21:48
Unknown Object (File)
Fri, Dec 13, 21:48
Unknown Object (File)
Fri, Dec 13, 21:48
Unknown Object (File)
Fri, Dec 13, 21:48
Subscribers

Details

Summary

A CLI command to get a notification payload from a service payload.

The goal is to ease debug of consumers applications: you can get a
sample notification without the assistance of the message broker
for a specified problematic payload.

Fixes T983.

Test Plan

Used for D347.

Diff Detail

Repository
rNOTIF Notifications center
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson retitled this revision from to Add notifications:payload command.
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: dereckson.
dereckson added inline comments.
app/Console/Commands/NotificationsPayload.php
11

Test me.

12

Not on an individual line.

116

ensureCorrectArgumentsCount() ?

122

Document me.

129

Document me.

134

Document me.

There is an issue in logic code too.

  [ErrorException]                           
  Undefined property: stdClass::$repository  
                                             

Exception trace:
 () at /home/ubuntu/workspace/notifications/app/Notifications/DockerHubNotification.php:47
 Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() at /home/ubuntu/workspace/notifications/app/Notifications/DockerHubNotification.php:47
 Nasqueron\Notifications\Notifications\DockerHubNotification->getText() at /home/ubuntu/workspace/notifications/app/Notifications/DockerHubNotification.php:37
 Nasqueron\Notifications\Notifications\DockerHubNotification->__construct() at /home/ubuntu/workspace/notifications/app/Console/Commands/NotificationsPayload.php:124
dereckson marked 4 inline comments as done.
dereckson edited edge metadata.

More tests.

There is an issue in logic code too.

[ErrorException]                           
Undefined property: stdClass::$repository

Payload was already a notification, not a DockerHub payload.

tests/Console/Commands/NotificationsPayloadTest.php
76

Add \EOL

dereckson edited edge metadata.
dereckson marked 3 inline comments as done.
This revision is now accepted and ready to land.Aug 19 2016, 12:50

Better code documentation

This revision was automatically updated to reflect the committed changes.