muesli / beehive

A flexible event/agent & automation system with lots of bees 🐝
GNU Affero General Public License v3.0
6.27k stars 320 forks source link

Test template filters #333

Closed orsinium closed 3 years ago

orsinium commented 3 years ago
  1. Make template filters kind of type-safe. leave type reflection to the template engine and accept already the right type. Also, it helps to correctly match the number of arguments, making error messages in that case user-friendly.
  2. Add unit tests for happy-path for custom filters.
  3. Do not suppress errors from filters, making them propagate up into the template engine. The engine gracefully handles it and returns as the second argument from Template.Execute method indicating template execution failure.

Thank you for the amazing project! I'm migrating from IFTTT :)

coveralls commented 3 years ago

Coverage Status

Coverage increased (+2.6%) to 71.515% when pulling 3cb789ade7dd0d9bdda4be01cd6b4113bb0cc355 on orsinium-forks:improve-templates into d22455f4dc361c6605db1f71ab5316ca5182ac37 on muesli:master.

orsinium commented 3 years ago

CI fails not because of my changes, I'm sure. Is it flaky? :thinking:

rocket357 commented 3 years ago

Yes. I put in a PR for docker and CI failed for windows! The docker file isnt (to my knowledge) used or touched in the CI builds. So I would assume CI is flakey.

On Fri, Oct 2, 2020, 08:07 Gram notifications@github.com wrote:

CI fails not because of my changes, I'm sure. Is it flaky? 🤔

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/muesli/beehive/pull/333#issuecomment-702723722, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGQUQWNHHVOTKEJS2D7GPDSIXGB7ANCNFSM4SBVIMNA .

muesli commented 3 years ago

Just a heads up: @penguwin is already working on fixing the Windows builds.

muesli commented 3 years ago

Great contribution, thank you!