Projet

Général

Profil

Bug #8425

Ajouter des vrais tests du multitenant

Ajouté par Benjamin Dauvergne il y a plus de 8 ans. Mis à jour il y a plus de 8 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
-
Début:
30 septembre 2015
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:

Description

Pour l'instant on a juste des tests des chargeurs de settings ce qui est bien mais loin d'être suffisant, ces nouveaux testent plus globalement les settings.

Ces tests sont séparés des tests actuels (dans un autre répertoire) car ils ne peuvent pas partager les mêmes settings, en gros on devrait avoir 3 batteries de tests:
  • pour le hobo server
  • pour le worker hobo
  • pour le multitenant et modules agents (ça va ensemble)

Ces tests supposent une base PostgreSQL locale et que l'utilisateur courant a le droit de créer des bases (qui s'appelleront test_fake_agent)


Fichiers

0001-multitenant-add-support-for-deletion-of-a-tenant.patch (2,44 ko) 0001-multitenant-add-support-for-deletion-of-a-tenant.patch Benjamin Dauvergne, 30 septembre 2015 10:23
0002-multitenant-allow-testing-multitenant-applications.patch (1,47 ko) 0002-multitenant-allow-testing-multitenant-applications.patch Benjamin Dauvergne, 30 septembre 2015 10:23
0003-tests-add-tests-for-the-multitenant-framework.patch (18,3 ko) 0003-tests-add-tests-for-the-multitenant-framework.patch Benjamin Dauvergne, 30 septembre 2015 10:24
0002-multitenant-allow-testing-multitenant-applications-8.patch (1,48 ko) 0002-multitenant-allow-testing-multitenant-applications-8.patch Benjamin Dauvergne, 30 septembre 2015 14:29
0001-multitenant-add-support-for-deletion-of-a-tenant-842.patch (2,67 ko) 0001-multitenant-add-support-for-deletion-of-a-tenant-842.patch Benjamin Dauvergne, 30 septembre 2015 14:29
0004-multitenant-fix-Tenant.get_hobo_json-8425.patch (937 octets) 0004-multitenant-fix-Tenant.get_hobo_json-8425.patch Benjamin Dauvergne, 30 septembre 2015 14:29
0003-tests-add-tests-for-the-multitenant-framework-8425.patch (22,7 ko) 0003-tests-add-tests-for-the-multitenant-framework-8425.patch Benjamin Dauvergne, 30 septembre 2015 14:29
0005-agent-common-fix-hobo_notify-8425.patch (1,39 ko) 0005-agent-common-fix-hobo_notify-8425.patch Benjamin Dauvergne, 30 septembre 2015 14:29
0002-multitenant-allow-testing-multitenant-applications-8.patch (1,48 ko) 0002-multitenant-allow-testing-multitenant-applications-8.patch Benjamin Dauvergne, 05 octobre 2015 21:19
0001-multitenant-add-support-for-deletion-of-a-tenant-842.patch (2,67 ko) 0001-multitenant-add-support-for-deletion-of-a-tenant-842.patch Benjamin Dauvergne, 05 octobre 2015 21:19
0004-multitenant-fix-Tenant.get_hobo_json-8425.patch (937 octets) 0004-multitenant-fix-Tenant.get_hobo_json-8425.patch Benjamin Dauvergne, 05 octobre 2015 21:19
0005-agent-common-fix-hobo_notify-8425.patch (1,39 ko) 0005-agent-common-fix-hobo_notify-8425.patch Benjamin Dauvergne, 05 octobre 2015 21:19
0003-tests-add-tests-for-the-multitenant-framework-8425.patch (22,8 ko) 0003-tests-add-tests-for-the-multitenant-framework-8425.patch Benjamin Dauvergne, 05 octobre 2015 21:19
0006-add-merge-coverage-script-8425.patch (8,49 ko) 0006-add-merge-coverage-script-8425.patch Benjamin Dauvergne, 05 octobre 2015 21:19
0007-add-merge-junit-results-script-8425.patch (2,02 ko) 0007-add-merge-junit-results-script-8425.patch Benjamin Dauvergne, 05 octobre 2015 21:19
0008-add-a-jenkins-script-8425.patch (1,64 ko) 0008-add-a-jenkins-script-8425.patch Benjamin Dauvergne, 05 octobre 2015 21:19
0009-agent-common-does-not-send-notifications-when-in-a-F.patch (1,07 ko) 0009-agent-common-does-not-send-notifications-when-in-a-F.patch Benjamin Dauvergne, 06 octobre 2015 11:21
0010-add-authentic2-agent-tests-8425.patch (7,29 ko) 0010-add-authentic2-agent-tests-8425.patch Benjamin Dauvergne, 06 octobre 2015 11:21

Révisions associées

Révision ed4dee0c (diff)
Ajouté par Benjamin Dauvergne il y a plus de 8 ans

multitenant: add support for deletion of a tenant (#8425)

As we do not really store the tenant models, supermethod is not called.
Tenant directory is not deleted but renamed with an '.invalid' suffix.
Those suffixed directories are ignored by the method to list available
tenants.

Révision b9e8f4ee (diff)
Ajouté par Benjamin Dauvergne il y a plus de 8 ans

multitenant: allow testing multitenant applications (#8425)

Django setup of db for tests always call "migrate" which the multitenant
application inactivate. This commit redirect this command to migrate-schemas
if we know that we are currently testing. It's copied from
django-tenant-schemas.

Révision 0b0ef397 (diff)
Ajouté par Benjamin Dauvergne il y a plus de 8 ans

tests: add tests for the multitenant framework (#8425)

tests/test_settings.py is moved in this new test suite. Tested are the
hobo_notify script and the simple creation of user objects.

Révision fd62795a (diff)
Ajouté par Benjamin Dauvergne il y a plus de 8 ans

multitenant: fix Tenant.get_hobo_json() (#8425)

Bug found using the new test suite.

Révision 0127af64 (diff)
Ajouté par Benjamin Dauvergne il y a plus de 8 ans

agent/common: fix hobo_notify (#8425)

two trivial bugs found using the new tests

Révision 96c4ec6f (diff)
Ajouté par Benjamin Dauvergne il y a plus de 8 ans

add merge-coverage script (#8425)

Révision 60c217b1 (diff)
Ajouté par Benjamin Dauvergne il y a plus de 8 ans

add merge-junit-results script (#8425)

Révision 85d55cc0 (diff)
Ajouté par Benjamin Dauvergne il y a plus de 8 ans

add a jenkins script (#8425)

Révision 7a057278 (diff)
Ajouté par Benjamin Dauvergne il y a plus de 8 ans

agent/common: does not send notifications when in a FakeTenant (#8425)

It breaks initial role migrations and new tenants deploy.

Révision 150d1e38 (diff)
Ajouté par Benjamin Dauvergne il y a plus de 8 ans

add authentic2 agent tests (#8425)

Historique

#1

Mis à jour par Benjamin Dauvergne il y a plus de 8 ans

J'en profite pour rajouter la possibilité de supprimer un tenant, en renommant le répertoire et en y ajoutant le suffixe '.invalid'. Ce suffixe fait que le tenant est alors ignoré.

#3

Mis à jour par Frédéric Péters il y a plus de 8 ans

Avoir deux séries de tests, ça ne posera pas de problème à la génération d'un fichier coverage unique ?

#4

Mis à jour par Benjamin Dauvergne il y a plus de 8 ans

J'ai déjà ce souci sur authentic et j'ai trouvé ça: http://git.entrouvert.org/authentic.git/tree/merge-coverage.py

#5

Mis à jour par Frédéric Péters il y a plus de 8 ans

Pour moi c'est bien, en ajoutant le merge-coverage.py dans le dépôt (et en pensant ensuite à aller modifier le job côté jenkins) (ou ajouter un jenkins.sh équivalent).

#8

Mis à jour par Frédéric Péters il y a plus de 8 ans

go.

#9

Mis à jour par Frédéric Péters il y a plus de 8 ans

  • Statut changé de Nouveau à Résolu (à déployer)

Poussés et publiés dans une 0.16.

#10

Mis à jour par Benjamin Dauvergne il y a plus de 8 ans

  • Statut changé de Résolu (à déployer) à Fermé

Formats disponibles : Atom PDF