Skip to content

feat: generate golden files for notification templates #14537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Sep 4, 2024
Merged
Prev Previous commit
Next Next commit
WIP
  • Loading branch information
mtojek committed Sep 4, 2024
commit e200056453816bc2328009ee4c70cb9fa09f4db8
2 changes: 1 addition & 1 deletion coderd/notifications/notifications_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import (
)

// updateGoldenFiles is a flag that can be set to update golden files.
var updateGoldenFiles = flag.Bool("update", false, "Update golden files")
var updateGoldenFiles = flag.Bool("update", true, "Update golden files")

func TestMain(m *testing.M) {
goleak.VerifyTestMain(m)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Hi bobby

The template **bobby-template** was deleted by **rob**.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Hi bobby,
User account **bobby** has been activated.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Hi bobby,

New user account **bobby** has been created.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Hi bobby,

User account **bobby** has been deleted.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Hi bobby,
User account **bobby** has been suspended.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Hi bobby
Your workspace **bobby-workspace** has been updated automatically to the latest template version (1.0).
Reason for update: **template now includes catnip**
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Hi bobby
Automatic build of your workspace **bobby-workspace** failed.
The specified reason was "**autostart**".
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Hi bobby,

Template Bobby First Template has failed to build 4/55 times over the last week and may be unstable.

**Report:**


**bobby-template-version-1** failed 3 times:


**bobby-template-version-2** failed 1 time:



We recommend reviewing these issues to ensure future builds are successful.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Hi bobby

Your workspace **bobby-workspace** was deleted.
The specified reason was "**autodeleted due to dormancy (autobuild)**".
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Hi bobby

Your workspace **bobby-workspace** has been marked as [**dormant**](https://coder.com/docs/templates/schedule#dormancy-threshold-enterprise) because of breached the template's threshold for inactivity.
Dormant workspaces are [automatically deleted](https://coder.com/docs/templates/schedule#dormancy-auto-deletion-enterprise) after 24 hours of inactivity.
To prevent deletion, use your workspace with the link below.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Hi bobby,

A manual build of the workspace **bobby-workspace** using the template **bobby-template** failed (version: **bobby-template-version**).
The workspace build was initiated by **joe**.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Hi bobby

Your workspace **bobby-workspace** has been marked for **deletion** after 24 hours of [dormancy](https://coder.com/docs/templates/schedule#dormancy-auto-deletion-enterprise) because of template updated to new dormancy policy.
To prevent deletion, use your workspace with the link below.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Hi bobby,
Your account **bobby** has been activated.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Hi bobby,
Your account **bobby** has been suspended.
Loading