Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

[feature] ProGet: Send test notifications from 'Notifiers & Webhooks'



  • Hello!

    When I'm adding new notifiers I'd like to be able to send a test message to check that it works as expected.

    Best regards
    Nils Nilsson


  • inedo-engineer

    Hi @Nils-Nilsson ,

    It's not really possible to "send a notification" without all the context (like Package Version, Name, etc.), but there is a relatively easy way to test that notifications are being sent (i.e. when you add a package).

    If you configure a Email Notifier, you can check off the "Add notification in ProGet". You can enter a "fake email" or not even configure SMTP settings.

    When you do that, it will still add a notification to ProGet (under Admin > Notifications) with the same body as the email.

    -- Dean



  • Hi @dean-houston

    That doesn't solve what I want to test.
    My scenario is more about testing a webhook to make sure that ProGet can reach the host and that the destination receive a well formatted message.

    I don't completely buy that it's impossible to send a notification without real data, as it should be trivial to send some dummy data when using a "Try-out" button.
    But I understand that if I'm the only one who has ever wanted this feature it wouldn't make sense to implement it.

    Best regards
    Nils Nilsson


  • inedo-engineer

    Hi @Nils-Nilsson ,

    It's possible but it's quite complex; there are dozens of variable/macros that rely on context (some will give an error) and none of them have built-in dummy data. That would make templating expressions like <% if %> or <% foreach %> difficult to test.

    In theory, you could enter a large box of variable expressions (like $FeedName=fake-feed)... but at that point, it's just easier to test things by performing the actions on a real package. A quick pgutil packages delete + pgutil packages upload script works great for that... that's how we test.

    Thanks,
    Alana



  • I had the same issue, and I had to side quest an vscode extension(github, marketplace, still alpha) just to get the syntax correct :)
    A try-out/dry-run button would be good though


  • inedo-engineer

    @sigurd-hansen_7559 wow very cool! We didn't anticipate anyone would customize these templates beyond adding a variable or two, so it it didn't seem to make a lot of sense to invest in a proper editor (like we have in the other products)

    Anyway, it'd be interesting to see what kind of templates you develop.


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation