-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix indexes #849
Fix indexes #849
Conversation
Change HASHED to ASCENDING and removed sparse from GEOSPHERE for documentdb compatibility
Fixes one part of e-mission/e-mission-docs#721 |
Allows DB name to be set in the URL of a config file. Defaults to "Stage_database" is no name is provided.
Hack to avoid dividing non-millisecond timestamps by 1000. Gets tests to pass.
We added the "new style" location format in 2015. We retained the code to process the "old style" format for backwards compatibility, since the clients would not necessarily be upgraded immediately. However: - all clients should have been updated by now - we have unpublished that client - we are creating a new client to talk to the new server Let's just remove the old style code path since we don't need it any more, and there's no point in keeping bitrotted code. This fixes e-mission/e-mission-docs#721 (comment) Changes: - change the data from the old format to the new format - ensure that we load the new format - remove `format_location_raw` and always return `format_location_simple` Testing done: - `emission/tests//netTests/TestBuiltinUserCacheHandlerInput.py` and - `emission/tests//netTests/TestBuiltinUserCacheHandlerOutput.py` both pass
Instead of the old style format This fixes the one test failure in #851
The name configuration for TestMongoAuth.py is easy enough, I can finalize those changes today, but I'm first having trouble getting the test to pass without any changes. I get auth errors when it tries to create the first admin user, which as I understand, shouldn't be happening: https://www.mongodb.com/docs/manual/core/localhost-exception/#std-label-localhost-exception The test itself seems to be written in a way were it expects this to work. I'm doing this on a fresh db without anything in it, so that shouldn't be the problem. And once this works, I can get the db name to be dynamic, but right now the only way I've been able to make it work is by manually adding a admin user via the mongo shell, connecting with that users credentials and then creating/using the new admin user the test creates. And this only works if you only run one test at a time, adding the admin user manually each time. If this is the intended use (I don't think it is), this test seems a little pointless to configure nicely, since there is so much manual work anyway. |
@aGuttman have you started mongodb with the
|
Yes. Without the auth option the users can be created but the |
Hm, interesting. Please file an issue for investigating that as well. So the next tasks are:
@aGuttman I think that's it! |
Got the tests to pass (so long as they are run one at a time, with correct admin already entered). Added functions to test creating new users with correct restrictions with a custom db name.
remove hacky dead code for connecting to multiple databases
Set database name as hardcoded global var instead of hardcoded in several, non-aggregated places.
Uncommenting a block of code that was left commented out on accident
Change HASHED to ASCENDING and removed sparse from GEOSPHERE for documentdb compatibility