Merge branch '21815-trigrams-exclude-ids'
[arvados.git] / lib / config / deprecated_test.go
index f73a92be5c44c4425aef83a7a8ae76fdba081d92..0feeec5e55cf3bb96a8baaac5337c80f9f8d0d82 100644 (file)
@@ -49,6 +49,26 @@ func testLoadLegacyConfig(content []byte, mungeFlag string, c *check.C) (*arvado
        return cluster, nil
 }
 
+func (s *LoadSuite) TestOldEmailConfiguration(c *check.C) {
+       logs := checkEquivalent(c, `
+Clusters:
+ z1111:
+  Mail:
+    SendUserSetupNotificationEmail: false
+    SupportEmailAddress: "support@example.invalid"
+`, `
+Clusters:
+ z1111:
+  Users:
+    SendUserSetupNotificationEmail: false
+    SupportEmailAddress: "support@example.invalid"
+`)
+       c.Check(logs, check.Matches, `(?ms).*deprecated or unknown config entry: .*Mail\.SendUserSetupNotificationEmail.*`)
+       c.Check(logs, check.Matches, `(?ms).*deprecated or unknown config entry: .*Mail\.SupportEmailAddress.*`)
+       c.Check(logs, check.Matches, `(?ms).*using your old config key Mail\.SendUserSetupNotificationEmail -- but you should rename it to Users\.SendUserSetupNotificationEmail.*`)
+       c.Check(logs, check.Matches, `(?ms).*using your old config key Mail\.SupportEmailAddress -- but you should rename it to Users\.SupportEmailAddress.*`)
+}
+
 func (s *LoadSuite) TestLegacyVolumeDriverParameters(c *check.C) {
        logs := checkEquivalent(c, `
 Clusters: