Project

General

Profile

Tâche #30504

Scénario #30270: Portage python3 de l'EAD2

Corriger les tests unitaires

Added by Emmanuel GARETTE about 3 years ago. Updated about 3 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
06/02/2020
Due date:
% Done:

100%

Remaining (hours):
0.0

Related issues

Related to Distribution EOLE - Tâche #29735: Mise à niveau des tests unitaires pour EOLE 2.8 Fermé 08/21/2020
Precedes Distribution EOLE - Scénario #30573: pb test unitaire scribe 2.8.0 (Imap/SASL?) Terminé (Sprint) 09/08/2020 09/25/2020

Associated revisions

Revision 69e69b3c (diff)
Added by Emmanuel GARETTE about 3 years ago

suppression de warnings lors des tests (ref #30504)

Revision 533a24ae (diff)
Added by Emmanuel GARETTE about 3 years ago

suppression de warnings lors des tests (ref #30504)

Revision 21d28fb3 (diff)
Added by Emmanuel GARETTE about 3 years ago

suppression de warnings lors des tests (ref #30504)

Revision 167e54de (diff)
Added by Emmanuel GARETTE about 3 years ago

correction des tests pour passer en python3 (ref #30504)

Revision 1615db00 (diff)
Added by Joël Cuissinat about 3 years ago

tests : file => open (ref #30504)

Revision 9f7b3996 (diff)
Added by Joël Cuissinat about 3 years ago

suppression de warnings lors des tests (ref #30504)

Revision db02767a (diff)
Added by Emmanuel GARETTE about 3 years ago

utilisation de la nouvelle fonction recurive_mode_makedirs de pyeole (ref #30504)

Revision 4eb8cf9a (diff)
Added by Emmanuel GARETTE about 3 years ago

fork de makedirs pour que makedirs soit recursif (ref #30504)

Revision d4f65e26 (diff)
Added by Joël Cuissinat about 3 years ago

run-module-tests : tests scribe-backend en python3 sur EOLE >= 2.8.0

Ref: #30504

History

#1 Updated by Emmanuel GARETTE about 3 years ago

  • Status changed from Nouveau to En cours

#2 Updated by Emmanuel GARETTE about 3 years ago

  • Status changed from En cours to Résolu

#3 Updated by Emmanuel GARETTE about 3 years ago

  • Assigned To set to Emmanuel GARETTE

#4 Updated by Emmanuel GARETTE about 3 years ago

  • Status changed from Résolu to En cours

#5 Updated by Emmanuel GARETTE about 3 years ago

Le test "test_devdir_eleve" ne passe pas.

Il y a un changement de comportement de os.makedirs :

Changed in version 3.7: The mode argument no longer affects the file permission bits of newly-created intermediate-level directories.

Le but est d'avoir le même comportement que mkdir -p : https://bugs.python.org/issue19930

#6 Updated by Emmanuel GARETTE about 3 years ago

Autres codes potentiellement affectés :

python-pyeole/pyeole/iso.py:        return os.makedirs(self.download_directory, mode=0o755)
eole-common/pretemplate/00-network:            os.makedirs(EOLE_CONFIG_DIR, mode=0o755)
eole-common/pretemplate/00-network:            os.makedirs(override_dir, mode=0o755)

Voir s'il faut utiliser la nouvelle fonction.

#7 Updated by Joël Cuissinat about 3 years ago

  • Related to Tâche #29735: Mise à niveau des tests unitaires pour EOLE 2.8 added

#8 Updated by Emmanuel GARETTE about 3 years ago

  • Status changed from En cours to Résolu
  • % Done changed from 0 to 100

Il reste des tests non passant mais a priori ce n'est pas un problème de test mais un problème de fonctionnement de la solution.

En effet je peux me connecter sur le DC :

root@addc:~# smbclient \\\\localhost\\netlogon -U __eleve__test__%'Eleveeole$'
Try "help" to get a list of possible commands.
smb: \> 

Mais pas en SASL :

root@scribe:~# testsaslauthd -u __eleve__test__@DOMSCRIBE.AC-TEST.FR -p 'Eleveeole$'
0: NO "authentication failed

Dans les logs de saslauthd on trouve :

2020-08-20T12:19:21.610743+02:00 scribe.domscribe.ac-test.fr saslauthd[36796]: Entry not found ((userPrincipalName=__eleve__test__@DOMSCRIBE.AC-TEST.FR)).
2020-08-20T12:19:21.625028+02:00 scribe.domscribe.ac-test.fr saslauthd[36796]: Authentication failed for __eleve__test__@DOMSCRIBE.AC-TEST.FR: User not found (-6)

Et je ne vois pas cette attribut dans le LDAP de samba :

root@addc:~# ldbsearch -H /var/lib/samba/private/sam.ldb userPrincipalName=* userPrincipalName|grep ^user
userPrincipalName: eole-sasl@domscribe.ac-test.fr
userPrincipalName: admin@domscribe.ac-test.fr
userPrincipalName: eole-workstation-manager@domscribe.ac-test.fr
userPrincipalName: gpo-addc@domscribe.ac-test.fr
userPrincipalName: eole-workstation-reader@domscribe.ac-test.fr

#9 Updated by Joël Cuissinat about 3 years ago

  • Status changed from Résolu to Fermé
  • Remaining (hours) set to 0.0

#10 Updated by Joël Cuissinat about 3 years ago

Also available in: Atom PDF