Update Configurations Migration Script for new Mongo containers
itsciccio opened this issue · 0 comments
itsciccio commented
Description
We need to connect to a different Mongo instance and update accordingly.
The following snippet provided by @simplyrider may be of aid:
self._mongo = MongoApi(
logger.getChild(MongoApi.__name__),
host=REPLICA_SET_HOSTS, db_name=env.DB_NAME,
replicaSet=REPLICA_SET_NAME
)
Requirements
- Update the
update_mongo_db
function inscripts/config_to_database_migration.py
script to connect to the new Mongo instance. - Test the script using various configurations, and assert that the data is correctly added in the appropiate Mongo document/(s).
Acceptance criteria
Scenario: Running scripts/config_to_database_migration.py
Given: That we want to migrate .ini files to Mongo
Then: Mongo is populated with the appropiate files