fluxcd / notification-controller

The GitOps Toolkit event forwarder and notification dispatcher
https://fluxcd.io
Apache License 2.0
150 stars 131 forks source link

Fix telegram test flake #894

Closed makkes closed 1 month ago

makkes commented 1 month ago

The test would sometimes fail because the metadata lines are built from a map and map iteration order in Go is non-deterministic. Therefore, the lines may be ordered differently between different test runs.

Now, the test sorts the metadata lines of the telegram message so they are always the same and only then verifies the expected output.

closes #867