Compare commits

..

No commits in common. "fix-74" and "master" have entirely different histories.

2 changed files with 3 additions and 5 deletions

View File

@ -198,6 +198,7 @@ class CreateInstance(TestCase):
register_util(t=self, username="createinstance_user") register_util(t=self, username="createinstance_user")
create_configurations(t=self) create_configurations(t=self)
def test_sanitize_vm_name(self): def test_sanitize_vm_name(self):
self.assertEqual(sanitize_vm_name(vm_name="LOWERname"), "lowername") self.assertEqual(sanitize_vm_name(vm_name="LOWERname"), "lowername")
@ -207,6 +208,7 @@ class CreateInstance(TestCase):
with self.assertRaises(VmException): with self.assertRaises(VmException):
sanitize_vm_name(vm_name="122342$#34234") sanitize_vm_name(vm_name="122342$#34234")
@override_settings( @override_settings(
HOSTEA=infra_custom_config(test_name="test_create_instance_util") HOSTEA=infra_custom_config(test_name="test_create_instance_util")
) )

View File

@ -196,11 +196,7 @@ class Forgejo:
resp = self.c.post(url, data=data, allow_redirects=False) resp = self.c.post(url, data=data, allow_redirects=False)
print(f"Created repository {name}") print(f"Created repository {name}")
if ( if resp.status_code != 302 and resp.status_code != 200:
resp.status_code != 302
and resp.status_code != 200
and resp.status_code != 303
):
raise Exception( raise Exception(
f"Error while creating repository: {name} {resp.status_code}" f"Error while creating repository: {name} {resp.status_code}"
) )