Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove test runner updates
Browse files Browse the repository at this point in the history
maskarb committed Jan 6, 2025
1 parent 128b0af commit 52f44f8
Showing 2 changed files with 0 additions and 34 deletions.
22 changes: 0 additions & 22 deletions koku/api/report/test/util/baker_recipes.py
Original file line number Diff line number Diff line change
@@ -14,10 +14,6 @@
from api.report.test.util.constants import GCP_CONSTANTS
from api.report.test.util.constants import OCI_CONSTANTS
from api.report.test.util.constants import OCP_CONSTANTS
from koku.database import get_model
from reporting.provider.aws.models import UI_SUMMARY_TABLES as AWS_UI_SUMMARY_TABLES
from reporting.provider.gcp.models import UI_SUMMARY_TABLES as GCP_UI_SUMMARY_TABLES
from reporting.provider.ocp.models import UI_SUMMARY_TABLES as OCP_UI_SUMMARY_TABLES

fake = Faker()

@@ -378,21 +374,3 @@ def decimal_yielder():
_fill_optional=True,
_quantity=OCI_CONSTANTS.length,
)

P_TABLES = [
get_model("AWSCostEntryLineItemDailySummary"),
get_model("AWSCostEntryLineItemSummaryByEC2ComputeP"),
get_model("AzureCostEntryLineItemDailySummary"),
get_model("GCPCostEntryLineItemDailySummary"),
get_model("OCPUsageLineItemDailySummary"),
get_model("OCPAWSCostLineItemDailySummaryP"),
get_model("OCPAWSCostLineItemProjectDailySummaryP"),
get_model("OCPAzureCostLineItemDailySummaryP"),
get_model("OCPAzureCostLineItemProjectDailySummaryP"),
get_model("OCPGCPCostLineItemDailySummaryP"),
get_model("OCPGCPCostLineItemProjectDailySummaryP"),
get_model("OCICostEntryLineItemDailySummary"),
*AWS_UI_SUMMARY_TABLES,
*GCP_UI_SUMMARY_TABLES,
*OCP_UI_SUMMARY_TABLES,
]
12 changes: 0 additions & 12 deletions koku/koku/koku_test_runner.py
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
#
# flake8: noqa
"""Koku Test Runner."""

import logging
import os
import sys
@@ -14,15 +13,12 @@
from django.db import connections
from django.test.runner import DiscoverRunner
from django.test.utils import get_unique_databases_and_mirrors
from django_tenants.utils import schema_context

from api.models import Customer
from api.models import Provider
from api.models import Tenant
from api.report.test.util.model_bakery_loader import ModelBakeryDataLoader
from api.report.test.util.baker_recipes import P_TABLES
from koku.env import ENVIRONMENT
from koku.pg_partition import PartitionHandlerMixin


OCP_ON_AWS_CLUSTER_ID = "OCP-on-AWS"
@@ -138,14 +134,6 @@ def setup_databases(verbosity, interactive, keepdb=False, debug_sql=False, paral
# OCI
bakery_data_loader.load_oci_data()

with schema_context(KokuTestRunner.schema):
PartitionHandlerMixin()._handle_partitions(
KokuTestRunner.schema,
P_TABLES,
bakery_data_loader.first_start_date,
bakery_data_loader.last_end_date,
)

for account in [("10002", "org2222222", "2222222"), ("12345", "org3333333", "3333333")]:
tenant = Tenant.objects.get_or_create(schema_name=account[1])[0]
tenant.save()

0 comments on commit 52f44f8

Please sign in to comment.