mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 02:17:37 -02:30
Implemented fact scan storage logic.
* added mongo connection logic * added mongo dbtransform logic to allow keys with . and $ * altered tower fact scanner CacheModule to emit a message for each fact module facts (including ansible facts). Previously, seperate facts module facts were getting concatenated to each subsequent emi * tower fact scanner CacheModule timeout set as to not hang for forever * broke apart commands.py test * added unit test for run_fact_cache_receiver, facts, and dbtransform
This commit is contained in:
@@ -25,6 +25,9 @@ from django.contrib.auth.models import User
|
||||
from django.test.client import Client
|
||||
from django.test.utils import override_settings
|
||||
|
||||
# MongoEngine
|
||||
from mongoengine.connection import get_db
|
||||
|
||||
# AWX
|
||||
from awx.main.models import * # noqa
|
||||
from awx.main.backend import LDAPSettings
|
||||
@@ -84,6 +87,11 @@ class BaseTestMixin(QueueTestMixin):
|
||||
|
||||
def setUp(self):
|
||||
super(BaseTestMixin, self).setUp()
|
||||
|
||||
# Drop mongo database
|
||||
self.db = get_db()
|
||||
self.db.connection.drop_database(settings.MONGO_DB)
|
||||
|
||||
self.object_ctr = 0
|
||||
# Save sys.path before tests.
|
||||
self._sys_path = [x for x in sys.path]
|
||||
|
||||
Reference in New Issue
Block a user