From f862c34757193a61d5894d95ff16998fd9982d8c Mon Sep 17 00:00:00 2001 From: Hostea dashboard Date: Mon, 12 Sep 2022 02:25:56 +0530 Subject: [PATCH] fix: instance_names in tests must be alphanumeric and be < 20 chars closes: https://gitea.gna.org/Hostea/dashboard/issues/57 --- billing/tests.py | 4 ++-- dash/tests.py | 2 +- infrastructure/tests.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/billing/tests.py b/billing/tests.py index 071764a..2499571 100644 --- a/billing/tests.py +++ b/billing/tests.py @@ -49,7 +49,7 @@ class BillingTest(TestCase): def test_payments(self): c = Client() login_util(self, c, "accounts.home") - instance_name = "test_payments" + instance_name = "tpayments" create_instance_util( t=self, c=c, instance_name=instance_name, config=self.instance_config[0] ) @@ -154,7 +154,7 @@ class GenerateInvoiceCommand(TestCase): def test_cmd(self): c = Client() login_util(self, c, "accounts.home") - instance_name = "test_generate_invoice_cmd" + instance_name = "tgeninvmd" create_instance_util( t=self, c=c, instance_name=instance_name, config=self.instance_config[0] ) diff --git a/dash/tests.py b/dash/tests.py index 52a9c91..93b509a 100644 --- a/dash/tests.py +++ b/dash/tests.py @@ -243,7 +243,7 @@ class CreateInstance(TestCase): self.assertEqual(Instance.objects.filter(name=payload["name"]).exists(), False) - instance_name = "test_create_instance_renders" + instance_name = "testirenrs" create_instance_util( t=self, c=c, instance_name=instance_name, config=self.instance_config[0] ) diff --git a/infrastructure/tests.py b/infrastructure/tests.py index bc06380..b7d83e7 100644 --- a/infrastructure/tests.py +++ b/infrastructure/tests.py @@ -185,7 +185,7 @@ class InfraUtilTest(TestCase): """ c = Client() login_util(self, c, "accounts.home") - instance_name = "test_vm_delete_payments" + instance_name = "trmpayments" infra = Infra()