Project

General

Profile

Tâche #24153

Scénario #23988: Tests et qualification (23-25)

Le test unitaire "test_InstallSSLFiles" échoue sur les modules eCDL et eSBL (2.7.0)

Added by Joël Cuissinat about 2 years ago. Updated about 2 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
06/07/2018
Due date:
% Done:

100%

Estimated time:
3.00 h
Spent time:
Remaining (hours):
0.0

Description

00:08:12.806                 def test_InstallSSLFiles():
00:08:12.807                     """ 
00:08:12.807                     Valide la copie des certificats pour un service
00:08:12.808                     """ 
00:08:12.808                     installcmd = """. /usr/lib/eole/utils.sh
00:08:12.809                 InstallSSLFiles {0} {1} {1} {2} mail""".format(crt_srv, crt_user, crt_path)
00:08:12.810                     assert system(installcmd) == 0
00:08:12.811                     #-rw------- 1 Debian-exim Debian-exim 1679 avril 30 14:07 /tmp/testcrt/private/testsrv.key
00:08:12.812                     res = system_out(['ls', '-al', join(crt_path, 'private', '{}.key'.format(crt_srv))], container='mail')[1].split()
00:08:12.813             >       assert res[0] == '-rw-------'
00:08:12.814             E       IndexError: list index out of range
00:08:12.814             tests/test_libeole.py:19: IndexError
00:08:12.815             ----------------------------- Captured stderr call -----------------------------
00:08:12.816             cp: impossible d'évaluer '/etc/ssl/certs/eole.crt': Aucun fichier ou dossier de ce type
00:08:12.817             chmod: impossible d'accéder à '/tmp/testcrt/certs/testsrv.crt': Aucun fichier ou dossier de ce type
00:08:12.818             cp: impossible d'évaluer '/etc/ssl/private/eole.key': Aucun fichier ou dossier de ce type
00:08:12.820             chmod: impossible d'accéder à '/tmp/testcrt/private/testsrv.key': Aucun fichier ou dossier de ce type

NB : vérifier le message du dessous au passage :

00:08:33.225             tests/test_loader.py:83
00:08:33.226               assertion is always true, perhaps remove parentheses?

Associated revisions

Revision ec442e91 (diff)
Added by Joël Cuissinat about 2 years ago

Test "InstallSSLFiles" only if instance is done

Ref: #24153

Revision b05f3c43 (diff)
Added by Joël Cuissinat about 2 years ago

fix wrong test in test_loader

Ref: #24153

History

#1 Updated by Joël Cuissinat about 2 years ago

  • Status changed from Nouveau to En cours

#2 Updated by Joël Cuissinat about 2 years ago

  • Assigned To set to Joël Cuissinat

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

En réalité, le code testé est fonctionnel uniquement si le serveur est instancié, ce qui n'est pas le cas des deux modules en erreur ;)

#4 Updated by Joël Cuissinat about 2 years ago

  • % Done changed from 0 to 100
  • Remaining (hours) changed from 3.0 to 0.25

#5 Updated by Scrum Master about 2 years ago

  • Status changed from En cours to Résolu

#6 Updated by Joël Cuissinat about 2 years ago

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

C'est tout vert depuis ;)

Also available in: Atom PDF