Skip to content

Conversation

dannykopping
Copy link
Contributor

I added a nasty little func called enumerateAllTemplates which enumerates all the notification templates defined in coderd/notifications/events.go. Using this, we can determine when we're missing test cases in TestNotificationTemplatesCanRender. I found two, and added those.

This is obviously suboptimal as a strategy: we should be using code-generation and linting. I've covered this in coder/internal#36. In the interim, let's not let the perfect get in the way of better test coverage.

Additionally, this adds the template update message to the TemplateWorkspaceAutoUpdated template so users will be informed of what changed when their template was auto-updated.

Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
@dannykopping dannykopping merged commit c6076d2 into main Aug 7, 2024
28 checks passed
@dannykopping dannykopping deleted the dk/template-version-param branch August 7, 2024 09:33
@github-actions github-actions bot locked and limited conversation to collaborators Aug 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants