mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 18:40:01 -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:
parent
1f91028399
commit
2f1d667e64
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user