mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 03:31:10 -03:30
Don't run the large inventory timing test locally.
This commit turns off local execution of the timing test for a large inventory. This test is pointless on local development, where (1) memory varies widely and (2) we're using an entirely different database (SQLite) for testing. Pulling it out makes local testing considerably quicker and avoids specious failures.
This commit is contained in:
@@ -11,6 +11,7 @@ import sys
|
||||
import tempfile
|
||||
import time
|
||||
import urlparse
|
||||
import unittest
|
||||
|
||||
# Django
|
||||
from django.conf import settings
|
||||
@@ -872,6 +873,9 @@ class InventoryImportTest(BaseCommandMixin, BaseLiveServerTest):
|
||||
self.assertEqual(new_inv.total_groups, ngroups)
|
||||
self.assertElapsedLessThan(30)
|
||||
|
||||
@unittest.skipIf(getattr(settings, 'LOCAL_DEVELOPMENT', False),
|
||||
'Skip this test in local development environments, '
|
||||
'which may vary widely on memory.')
|
||||
def test_large_inventory_file(self):
|
||||
new_inv = self.organizations[0].inventories.create(name='largeinv')
|
||||
self.assertEqual(new_inv.hosts.count(), 0)
|
||||
|
||||
Reference in New Issue
Block a user