From 01c56a4f2b551e3e089623e9f658ff6270fe2d20 Mon Sep 17 00:00:00 2001 From: chris meyers Date: Wed, 22 Apr 2020 14:10:45 -0400 Subject: [PATCH] lie about last time analytics were collected * Ensure that everything that we put into the database is returned via analytics. --- awx/main/tests/functional/analytics/test_collectors.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/awx/main/tests/functional/analytics/test_collectors.py b/awx/main/tests/functional/analytics/test_collectors.py index d1c426b8ec..500cd89053 100644 --- a/awx/main/tests/functional/analytics/test_collectors.py +++ b/awx/main/tests/functional/analytics/test_collectors.py @@ -5,6 +5,7 @@ import shutil import csv from django.utils.timezone import now +from datetime import timedelta from django.db.backends.sqlite3.base import SQLiteCursorWrapper from awx.main.analytics import collectors @@ -73,7 +74,7 @@ def test_copy_tables_unified_job_query( Ensure that various unified job types are in the output of the query. """ - time_start = now() + time_start = now() - timedelta(hours=9) inv_src = InventorySource.objects.create( name="inventory_update1", inventory=inventory, source="gce" ) @@ -130,7 +131,7 @@ def workflow_job(states=["new", "new", "new", "new", "new"]): @pytest.mark.django_db def test_copy_tables_workflow_job_node_query(sqlite_copy_expert, workflow_job): - time_start = now() + time_start = now() - timedelta(hours=9) with tempfile.TemporaryDirectory() as tmpdir: collectors.copy_tables(time_start, tmpdir, subset="workflow_job_node_query")