Previously, some of them send a plain "uid" and some of them sent the "uid" as "uid@domain" for historical reasons. Now they all just send a plain "uid", with the domain in a separate "iss" field.
* test(i18n): cache parsing of po files
When running our remote tests, every time we restarted the server, we
would re-parse all of the po translation files. Each time takes around
500ms. By caching files we've already parsed, this shaves around 12s off
the remote test suite.
* test(dev): make `npm test` faster, provide `npm run test-ci`
Since `npm test` is what we run constantly when working on features, if
we can make it faster, we make development faster.
- Disable memcache. We never specifically start a memcached, but the
tests were running trying to look for it. With the default settings
being to retry once with a 500ms timeout, many test would hang for 1s
checking memcached for data that wasn't even useful to the test. By
setting to 'none', this saved 45s.
- Disable scrypt. scrypt is **slow**. While developing locally, and
running the tests, we don't actually need to test that some value run
through scrypt turns out to be correctly encrypted. By using the
verifier version '0', this saved 55s.
- Disable coverage. Using coverage takes some time to instrument the
code, and spawn in a child process. While nyc is pretty good at caching,
and the slow down isn't that much, it's also more annoying to debug
with. First, it ruins all stack trace lines numbers. Second, it spits a
gigantic coverage report at the end of the test run, requiring scrolling
back up to see the actual test results.
To make sure we still run the test suite with the default options
enabled, this provides a `test-ci` target, that is enabled to be always
be run from TravisCI and Circle.
The config for each bounce type can now contain a map of counts vs
durations. This allows a tiered approach to blocking email actions based
on bounce history.
For example:
```
{
0: 5000,
5: 20000
}
```
This tier mapping is translated as "more than 0 in 5 seconds" or "more
than 5 in 20 seconds". If either condition is true, the appropriate
error is thrown.
The throw error also now includes the timestamp of the latest bounce, to
allow for reporting of when exactly that bounce was recorded at.
Closes#1893
We were using a made up sender, which caused our email provider
to drop the messages on the ground when testing on fxa-ci. Messages
were reported as delivered, but never seen again.
We currently allow devices to submit invalid public keys with
their push registration, causing attempts to notify those devices
to fail in an ugly way. This adds additional validation so that
only known-good keys get stored in the db.