Open freeqaz opened 9 years ago
:-1: what does common datacenter even mean.
datacenter is a production thing only; you only have a datacenter in production.
I keep hitting a wall when testing datacenter-specific stuff. The model that we're using makes it hard to test something, since we keep a test.json
environment. So if I want to test, I've got to create test.datacenter.json
and keep it in sync with production.datacenter.json
. It makes it hard to ensure that the production config is well tested, because it's never actually asserted against.
Having common.datacenter.json
allows production to utilize the same set of datacenter-specific config that the test environment is asserting against.
You can just overload the config for any wacky tests with --config=/var/config/some-file.json
flag
I like the idea of common.pek1.json for the same reason of avoiding duplicates between both test.pek1.json and production.pek1.json.
@lxe tests needs to be written against real config data otherwise it would not be good tests.
@freeqaz test.json
is a terrible idea; don't do it.
If you want to test stuff use the seedConfig
feature; that's the correct way to test stuff.
We really should remove the test.json
feature.
You would load production
and then override the config with test-specific things?
I don't see seedConfig
in the readme. I'll check out the source.
The option is called "seed". Not "seedConfig"
Adds support for
common.DATACENTER.json
which is useful to reduce duplication of configuration.r: @Raynos @lxe @rajeshsegu @malandrew