File tree Expand file tree Collapse file tree 4 files changed +29
-1
lines changed Expand file tree Collapse file tree 4 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -1037,6 +1037,7 @@ when required by your organization's security policy.`,
1037
1037
Description : "The hostname identifying the SMTP server." ,
1038
1038
Flag : "email-hello" ,
1039
1039
Env : "CODER_EMAIL_HELLO" ,
1040
+ Default : "localhost" ,
1040
1041
Value : & c .Notifications .SMTP .Hello ,
1041
1042
Group : & deploymentGroupEmail ,
1042
1043
YAML : "hello" ,
@@ -2625,6 +2626,7 @@ Write out the current server config as YAML to stdout.`,
2625
2626
Description : "The hostname identifying the SMTP server." ,
2626
2627
Flag : "notifications-email-hello" ,
2627
2628
Env : "CODER_NOTIFICATIONS_EMAIL_HELLO" ,
2629
+ Default : "localhost" ,
2628
2630
Value : & c .Notifications .SMTP .Hello ,
2629
2631
Group : & deploymentGroupNotificationsEmail ,
2630
2632
YAML : "hello" ,
Original file line number Diff line number Diff line change @@ -619,6 +619,30 @@ func TestEmailValuesTakeCorrectPrecedent(t *testing.T) {
619
619
newEnv : "CODER_EMAIL_SMARTHOST" ,
620
620
expectedValue : "localhost:1000" ,
621
621
},
622
+ {
623
+ name : "CODER_NOTIFICATIONS_EMAIL_HELLO is not discarded" ,
624
+ envs : []serpent.EnvVar {
625
+ {
626
+ Name : "CODER_NOTIFICATIONS_EMAIL_HELLO" ,
627
+ Value : "not-localhost" ,
628
+ },
629
+ },
630
+ oldEnv : "CODER_NOTIFICATIONS_EMAIL_HELLO" ,
631
+ newEnv : "CODER_EMAIL_HELLO" ,
632
+ expectedValue : "not-localhost" ,
633
+ },
634
+ {
635
+ name : "CODER_EMAIL_HELLO is not discarded" ,
636
+ envs : []serpent.EnvVar {
637
+ {
638
+ Name : "CODER_EMAIL_HELLO" ,
639
+ Value : "not-localhost" ,
640
+ },
641
+ },
642
+ oldEnv : "CODER_NOTIFICATIONS_EMAIL_HELLO" ,
643
+ newEnv : "CODER_EMAIL_HELLO" ,
644
+ expectedValue : "not-localhost" ,
645
+ },
622
646
}
623
647
624
648
for _ , tt := range tests {
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ require (
204
204
github.com/charmbracelet/bubbles v0.20.0
205
205
github.com/charmbracelet/bubbletea v1.2.1
206
206
github.com/charmbracelet/lipgloss v1.0.0
207
- github.com/coder/serpent v0.8.0
207
+ github.com/coder/serpent v0.8.1-0.20241113113009-ad8fe148f0d8
208
208
github.com/emersion/go-sasl v0.0.0-20200509203442-7bfe0ed36a21
209
209
github.com/emersion/go-smtp v0.21.2
210
210
github.com/go-jose/go-jose/v4 v4.0.2
Original file line number Diff line number Diff line change @@ -230,6 +230,8 @@ github.com/coder/retry v1.5.1 h1:iWu8YnD8YqHs3XwqrqsjoBTAVqT9ml6z9ViJ2wlMiqc=
230
230
github.com/coder/retry v1.5.1 /go.mod h1:blHMk9vs6LkoRT9ZHyuZo360cufXEhrxqvEzeMtRGoY =
231
231
github.com/coder/serpent v0.8.0 h1:6OR+k6fekhSeEDmwwzBgnSjaa7FfGGrMlc3GoAEH9dg =
232
232
github.com/coder/serpent v0.8.0 /go.mod h1:cZFW6/fP+kE9nd/oRkEHJpG6sXCtQ+AX7WMMEHv0Y3Q =
233
+ github.com/coder/serpent v0.8.1-0.20241113113009-ad8fe148f0d8 h1:xBsCXOg2KBd5eq2uJFjXjVEJCZn6QaflS7qgzzipqZE =
234
+ github.com/coder/serpent v0.8.1-0.20241113113009-ad8fe148f0d8 /go.mod h1:cZFW6/fP+kE9nd/oRkEHJpG6sXCtQ+AX7WMMEHv0Y3Q =
233
235
github.com/coder/ssh v0.0.0-20231128192721-70855dedb788 h1:YoUSJ19E8AtuUFVYBpXuOD6a/zVP3rcxezNsoDseTUw =
234
236
github.com/coder/ssh v0.0.0-20231128192721-70855dedb788 /go.mod h1:aGQbuCLyhRLMzZF067xc84Lh7JDs1FKwCmF1Crl9dxQ =
235
237
github.com/coder/tailscale v1.1.1-0.20241003034647-02286e537fc2 h1:mBbPFyJ2i9o490IwWGvWgtG0qmvIk45R7GWJpoaXotI =
You can’t perform that action at this time.
0 commit comments