Skip to content

Commit

Permalink
refactor: cleanup template configs
Browse files Browse the repository at this point in the history
  • Loading branch information
Benehiko committed Feb 7, 2022
1 parent cfd3b91 commit db1e92a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 30 deletions.
1 change: 0 additions & 1 deletion courier/template/testhelpers/testhelpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
func SetupRemoteConfig(t *testing.T, ctx context.Context, plaintext string, html string, subject string) *driver.RegistryDefault {
_, reg := internal.NewFastRegistryWithMocks(t)
require.NoError(t, reg.Config(ctx).Set(config.ViperKeyCourierTemplatesRecoveryInvalidEmail, &config.CourierEmailTemplate{
TemplateRoot: "",
Body: &config.CourierEmailBodyTemplate{
PlainText: plaintext,
HTML: html,
Expand Down
6 changes: 2 additions & 4 deletions driver/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,8 @@ type (
HTML string `json:"html"`
}
CourierEmailTemplate struct {
TemplateRoot string `json:"template_root,omitempty"`
Body *CourierEmailBodyTemplate `json:"body"`
Subject string `json:"subject"`
Body *CourierEmailBodyTemplate `json:"body"`
Subject string `json:"subject"`
}
Config struct {
l *logrusx.Logger
Expand Down Expand Up @@ -871,7 +870,6 @@ func (p *Config) CourierTemplatesRoot() string {

func (p *Config) CourierTemplatesHelper(key string) *CourierEmailTemplate {
courierTemplate := &CourierEmailTemplate{
TemplateRoot: "",
Body: &CourierEmailBodyTemplate{
PlainText: "",
HTML: "",
Expand Down
11 changes: 3 additions & 8 deletions driver/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1063,11 +1063,9 @@ func TestCourierTemplatesConfig(t *testing.T) {
})

t.Run("case=load remote template with fallback template overrides path", func(t *testing.T) {
c, err := config.New(ctx, logrusx.New("", ""), os.Stderr,
_, err := config.New(ctx, logrusx.New("", ""), os.Stderr,
configx.WithConfigFiles("stub/.kratos.courier.remote.templates.yaml"))
assert.NoError(t, err)
assert.Contains(t, c.CourierTemplatesRecoveryInvalid().TemplateRoot, "root")
assert.Empty(t, c.CourierTemplatesRecoveryValid().TemplateRoot)
})

t.Run("case=courier template helper", func(t *testing.T) {
Expand All @@ -1077,7 +1075,6 @@ func TestCourierTemplatesConfig(t *testing.T) {
assert.NoError(t, err)

courierTemplateConfig := &config.CourierEmailTemplate{
TemplateRoot: "",
Body: &config.CourierEmailBodyTemplate{
PlainText: "",
HTML: "",
Expand All @@ -1091,17 +1088,15 @@ func TestCourierTemplatesConfig(t *testing.T) {
assert.Equal(t, courierTemplateConfig, c.CourierTemplatesHelper("a_random_key"))

courierTemplateConfig = &config.CourierEmailTemplate{
TemplateRoot: "root",
Body: &config.CourierEmailBodyTemplate{
PlainText: "base64://e3tkZWZpbmUgcm9vdH19CkhpLAoKeW91IChvciBzb21lb25lIGVsc2UpIGVudGVyZWQgdGhpcyBlbWFpbCBhZGRyZXNzIHdoZW4gdHJ5aW5nIHRvIHJlY292ZXIgYWNjZXNzIHRvIGFuIGFjY291bnQuCgpIb3dldmVyLCB0aGlzIGVtYWlsIGFkZHJlc3MgaXMgbm90IG9uIG91ciBkYXRhYmFzZSBvZiByZWdpc3RlcmVkIHVzZXJzIGFuZCB0aGVyZWZvcmUgdGhlIGF0dGVtcHQgaGFzIGZhaWxlZC4KCklmIHRoaXMgd2FzIHlvdSwgY2hlY2sgaWYgeW91IHNpZ25lZCB1cCB1c2luZyBhIGRpZmZlcmVudCBhZGRyZXNzLgoKSWYgdGhpcyB3YXMgbm90IHlvdSwgcGxlYXNlIGlnbm9yZSB0aGlzIGVtYWlsLgp7ey0gZW5kIC19fQo=",
HTML: "base64://e3tkZWZpbmUgcm9vdH19CkhpLAoKeW91IChvciBzb21lb25lIGVsc2UpIGVudGVyZWQgdGhpcyBlbWFpbCBhZGRyZXNzIHdoZW4gdHJ5aW5nIHRvIHJlY292ZXIgYWNjZXNzIHRvIGFuIGFjY291bnQuCgpIb3dldmVyLCB0aGlzIGVtYWlsIGFkZHJlc3MgaXMgbm90IG9uIG91ciBk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nbmVkIHVwIHVzaW5nIGEgZGlmZmVyZW50IGFkZHJlc3MuCgpJZiB0aGlzIHdhcyBub3QgeW91LCBwbGVhc2UgaWdub3JlIHRoaXMgZW1haWwu",
},
Subject: "base64://QWNjb3VudCBBY2Nlc3MgQXR0ZW1wdGVk",
}
assert.Equal(t, courierTemplateConfig, c.CourierTemplatesHelper(config.ViperKeyCourierTemplatesRecoveryInvalidEmail))

courierTemplateConfig = &config.CourierEmailTemplate{
TemplateRoot: "",
Body: &config.CourierEmailBodyTemplate{
PlainText: "base64://e3sgZGVmaW5lIGFmLVpBIH19CkhhbGxvLAoKSGVyc3RlbCBqb3UgcmVrZW5pbmcgZGV1ciBoaWVyZGllIHNrYWtlbCB0ZSB2b2xnOgp7ey0gZW5kIC19fQoKe3sgZGVmaW5lIGVuLVVTIH19CkhpLAoKcGxlYXNlIHJlY292ZXIgYWNjZXNzIHRvIHlvdXIgYWNjb3VudCBieSBjbGlja2luZyB0aGUgZm9sbG93aW5nIGxpbms6Cnt7LSBlbmQgLX19Cgp7ey0gaWYgZXEgLmxhbmcgImFmLVpBIiAtfX0KCnt7IHRlbXBsYXRlICJhZi1aQSIgLiB9fQoKe3stIGVsc2UgLX19Cgp7eyB0ZW1wbGF0ZSAiZW4tVVMiIH19Cgp7ey0gZW5kIC19fQp7eyAuUmVjb3ZlcnlVUkwgfX0K",
HTML: "base64://e3sgZGVmaW5lIGFmLVpBIH19CkhhbGxvLAoKSGVyc3RlbCBqb3UgcmVrZW5pbmcgZGV1ciBoaWVyZGllIHNrYWtlbCB0ZSB2b2xnOgp7ey0gZW5kIC19fQoKe3sgZGVmaW5lIGVuLVVTIH19CkhpLAoKcGxlYXNlIHJlY292ZXIgYWNjZXNzIHRvIHlvdXIgYWNjb3VudCBieSBjbGlja2luZyB0aGUgZm9sbG93aW5nIGxpbms6Cnt7LSBlbmQgLX19Cgp7ey0gaWYgZXEgLmxhbmcgImFmLVpBIiAtfX0KCnt7IHRlbXBsYXRlICJhZi1aQSIgLiB9fQoKe3stIGVsc2UgLX19Cgp7eyB0ZW1wbGF0ZSAiZW4tVVMiIH19Cgp7ey0gZW5kIC19fQo8YSBocmVmPSJ7eyAuUmVjb3ZlcnlVUkwgfX0iPnt7IC5SZWNvdmVyeVVSTCB9fTwvYT4=",
Expand Down
5 changes: 1 addition & 4 deletions driver/config/stub/.kratos.courier.remote.invalid.body.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@ courier:
recovery:
invalid:
email:
# template_root could be necessary when there are nested templates
template_root: "root"
body:
html: base64://e3tkZWZpbmUgcm9vdH19CkhpLAoKeW91IChvciBzb21lb25lIGVsc2UpIGVudGVyZWQgdGhpcyBlbWFpbCBhZGRyZXNzIHdoZW4gdHJ5aW5nIHRvIHJlY292ZXIgYWNjZXNzIHRvIGFuIGFjY291bnQuCgpIb3dldmVyLCB0aGlzIGVtYWlsIGFkZHJlc3MgaXMgbm90IG9uIG91ciBkYXRhYmFzZSBvZiByZWdpc3RlcmVkIHVzZXJzIGFuZCB0aGVyZWZvcmUgdGhlIGF0dGVtcHQgaGFzIGZhaWxlZC4KCklmIHRoaXMgd2FzIHlvdSwgY2hlY2sgaWYgeW91IHNpZ25lZCB1cCB1c2luZyBhIGRpZmZlcmVudCBhZGRyZXNzLgoKSWYgdGhpcyB3YXMgbm90IHlvdSwgcGxlYXNlIGlnbm9yZSB0aGlzIGVtYWlsLgp7ey0gZW5kIC19fQo=
html: base64://SGksCgp5b3UgKG9yIHNvbWVvbmUgZWxzZSkgZW50ZXJlZCB0aGlzIGVtYWlsIGFkZHJlc3Mgd2hlbiB0cnlpbmcgdG8gcmVjb3ZlciBhY2Nlc3MgdG8gYW4gYWNjb3VudC4KCkhvd2V2ZXIsIHRoaXMgZW1haWwgYWRkcmVzcyBpcyBub3Qgb24gb3VyIGRhdGFiYXNlIG9mIHJlZ2lzdGVyZWQgdXNlcnMgYW5kIHRoZXJlZm9yZSB0aGUgYXR0ZW1wdCBoYXMgZmFpbGVkLgoKSWYgdGhpcyB3YXMgeW91LCBjaGVjayBpZiB5b3Ugc2lnbmVkIHVwIHVzaW5nIGEgZGlmZmVyZW50IGFkZHJlc3MuCgpJZiB0aGlzIHdhcyBub3QgeW91LCBwbGVhc2UgaWdub3JlIHRoaXMgZW1haWwu
# omit plaintext to verify it is validated
subject: Account Access Attempted
valid:
# omit template_root as it is not required on valid
email:
body:
plaintext: base64://e3sgZGVmaW5lIGFmLVpBIH19CkhhbGxvLAoKSGVyc3RlbCBqb3UgcmVrZW5pbmcgZGV1ciBoaWVyZGllIHNrYWtlbCB0ZSB2b2xnOgp7ey0gZW5kIC19fQoKe3sgZGVmaW5lIGVuLVVTIH19CkhpLAoKcGxlYXNlIHJlY292ZXIgYWNjZXNzIHRvIHlvdXIgYWNjb3VudCBieSBjbGlja2luZyB0aGUgZm9sbG93aW5nIGxpbms6Cnt7LSBlbmQgLX19Cgp7ey0gaWYgZXEgLmxhbmcgImFmLVpBIiAtfX0KCnt7IHRlbXBsYXRlICJhZi1aQSIgLiB9fQoKe3stIGVsc2UgLX19Cgp7eyB0ZW1wbGF0ZSAiZW4tVVMiIH19Cgp7ey0gZW5kIC19fQp7eyAuUmVjb3ZlcnlVUkwgfX0K
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ courier:
recovery:
invalid:
email:
# template_root could be necessary when there are nested templates
template_root: "root"
body:
html: base64://e3tkZWZpbmUgcm9vdH19CkhpLAoKeW91IChvciBzb21lb25lIGVsc2UpIGVudGVyZWQgdGhpcyBlbWFpbCBhZGRyZXNzIHdoZW4gdHJ5aW5nIHRvIHJlY292ZXIgYWNjZXNzIHRvIGFuIGFjY291bnQuCgpIb3dldmVyLCB0aGlzIGVtYWlsIGFkZHJlc3MgaXMgbm90IG9uIG91ciBkYXRhYmFzZSBvZiByZWdpc3RlcmVkIHVzZXJzIGFuZCB0aGVyZWZvcmUgdGhlIGF0dGVtcHQgaGFzIGZhaWxlZC4KCklmIHRoaXMgd2FzIHlvdSwgY2hlY2sgaWYgeW91IHNpZ25lZCB1cCB1c2luZyBhIGRpZmZlcmVudCBhZGRyZXNzLgoKSWYgdGhpcyB3YXMgbm90IHlvdSwgcGxlYXNlIGlnbm9yZSB0aGlzIGVtYWlsLgp7ey0gZW5kIC19fQo=
html: base64://SGksCgp5b3UgKG9yIHNvbWVvbmUgZWxzZSkgZW50ZXJlZCB0aGlzIGVtYWlsIGFkZHJlc3Mgd2hlbiB0cnlpbmcgdG8gcmVjb3ZlciBhY2Nlc3MgdG8gYW4gYWNjb3VudC4KCkhvd2V2ZXIsIHRoaXMgZW1haWwgYWRkcmVzcyBpcyBub3Qgb24gb3VyIGRhdGFiYXNlIG9mIHJlZ2lzdGVyZWQgdXNlcnMgYW5kIHRoZXJlZm9yZSB0aGUgYXR0ZW1wdCBoYXMgZmFpbGVkLgoKSWYgdGhpcyB3YXMgeW91LCBjaGVjayBpZiB5b3Ugc2lnbmVkIHVwIHVzaW5nIGEgZGlmZmVyZW50IGFkZHJlc3MuCgpJZiB0aGlzIHdhcyBub3QgeW91LCBwbGVhc2UgaWdub3JlIHRoaXMgZW1haWwu
# omit subject to verify it is validated
valid:
# omit template_root as it is not required on valid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ courier:
recovery:
invalid:
email:
# template_root could be necessary when there are nested templates, but is not required
template_root: "root"
body:
plaintext: base64://e3tkZWZpbmUgcm9vdH19CkhpLAoKeW91IChvciBzb21lb25lIGVsc2UpIGVudGVyZWQgdGhpcyBlbWFpbCBhZGRyZXNzIHdoZW4gdHJ5aW5nIHRvIHJlY292ZXIgYWNjZXNzIHRvIGFuIGFjY291bnQuCgpIb3dldmVyLCB0aGlzIGVtYWlsIGFkZHJlc3MgaXMgbm90IG9uIG91ciBkYXRhYmFzZSBvZiByZWdpc3RlcmVkIHVzZXJzIGFuZCB0aGVyZWZvcmUgdGhlIGF0dGVtcHQgaGFzIGZhaWxlZC4KCklmIHRoaXMgd2FzIH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dub3JlIHRoaXMgZW1haWwu
html: base64://SGksCgp5b3UgKG9yIHNvbWVvbmUgZWxzZSkgZW50ZXJlZCB0aGlzIGVtYWlsIGFkZHJlc3Mgd2hlbiB0cnlpbmcgdG8gcmVjb3ZlciBhY2Nlc3MgdG8gYW4gYWNjb3VudC4KCkhvd2V2ZXIsIHRoaXMgZW1haWwgYWRkcmVzcyBpcyBub3Qgb24gb3VyIGRhdGFiYXNlIG9mIHJlZ2lzdGVyZWQgdXNlcnMgYW5kIHRoZXJlZm9yZSB0aGUgYXR0ZW1wdCBoYXMgZmFpbGVkLgoKSWYgdGhpcyB3YXMgeW91LCBjaGVjayBpZiB5b3Ugc2lnbmVkIHVwIHVzaW5nIGEgZGlmZmVyZW50IGFkZHJlc3MuCgpJZiB0aGlzIHdhcyBub3QgeW91LCBwbGVhc2UgaWdub3JlIHRoaXMgZW1haWwu
verification:
valid:
email:
Expand Down
9 changes: 3 additions & 6 deletions driver/config/stub/.kratos.courier.remote.templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,15 @@ courier:
recovery:
invalid:
email:
# template_root could be necessary when there are nested templates, but is not required
template_root: "root"
body:
plaintext: base64://e3tkZWZpbmUgcm9vdH19CkhpLAoKeW91IChvciBzb21lb25lIGVsc2UpIGVudGVyZWQgdGhpcyBlbWFpbCBhZGRyZXNzIHdoZW4gdHJ5aW5nIHRvIHJlY292ZXIgYWNjZXNzIHRvIGFuIGFjY291bnQuCgpIb3dldmVyLCB0aGlzIGVtYWlsIGFkZHJlc3MgaXMgbm90IG9uIG91ciBkYXRhYmFzZSBvZiByZWdpc3RlcmVkIHVzZXJzIGFuZCB0aGVyZWZvcmUgdGhlIGF0dGVtcHQgaGFzIGZhaWxlZC4KCklmIHRoaXMgd2FzIHlvdSwgY2hlY2sgaWYgeW91IHNpZ25lZCB1cCB1c2luZyBhIGRpZmZlcmVudCBhZGRyZXNzLgoKSWYgdGhpcyB3YXMgbm90IHlvdSwgcGxlYXNlIGlnb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dXIgYWNjb3VudCBieSBjbGlja2luZyB0aGUgZm9sbG93aW5nIGxpbms6Cnt7LSBlbmQgLX19Cgp7ey0gaWYgZXEgLmxhbmcgImFmLVpBIiAtfX0KCnt7IHRlbXBsYXRlICJhZi1aQSIgLiB9fQoKe3stIGVsc2UgLX19Cgp7eyB0ZW1wbGF0ZSAiZW4tVVMiIH19Cgp7ey0gZW5kIC19fQo8YSBocmVmPSJ7eyAuUmVjb3ZlcnlVUkwgfX0iPnt7IC5SZWNvdmVyeVVSTCB9fTwvYT4=
subject: base64://UmVjb3ZlciBhY2Nlc3MgdG8geW91ciBhY2NvdW50
# omit recovery here to test templates override fallback
# omit verification here to test templates override fallback
template_override_path: "../../courier/template/courier/builtin/templates"

0 comments on commit db1e92a

Please sign in to comment.