Page MenuHomeDevCentral

Add notifications:payload command
ClosedPublic

Authored by dereckson on Aug 19 2016, 10:48.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 22, 23:05
Unknown Object (File)
Sun, Apr 21, 23:52
Unknown Object (File)
Sun, Apr 21, 23:43
Unknown Object (File)
Sun, Apr 21, 23:34
Unknown Object (File)
Sun, Apr 21, 20:26
Unknown Object (File)
Sat, Apr 20, 07:58
Unknown Object (File)
Fri, Apr 19, 11:10
Unknown Object (File)
Thu, Apr 18, 22:23
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.