#9013 [ipatests] test_external_ca.py::TestMultipleExternalCA::test_master_install_ca1 fails
Closed: fixed 6 months ago by rcritten. Opened 7 months ago by slev.

The aforementioned test fails in environments where a controller and master is the same host (e.g. Azure Pipelines):

[ipatests.pytest_ipa.integration.host.Host.master1.IPAOpenSSHTransport] PUT /tmp/tmpsz9b0bq6root_ca.crt
[ipatests.pytest_ipa.integration.host.Host.master1.cmd36] RUN ['tee', '/tmp/tmpsz9b0bq6root_ca.crt']
[ipatests.pytest_ipa.integration.host.Host.master1.cmd36] tee: /tmp/tmpsz9b0bq6root_ca.crt: Is a directory
[ipatests.pytest_ipa.integration.host.Host.master1.cmd36] Exit code: 1
FAILED [ 50%][ipatests.pytest_ipa.integration] Collecting logs from: master1.ipa.test
464     def test_master_install_ca1(self):                                          
465         install_server_external_ca_step1(self.master)                           
466         # Sign CA, transport it to the host and get ipa a root ca paths.        
467         root_ca_fname1 = tempfile.mkdtemp(suffix='root_ca.crt', dir=paths.TMP)  
468         ipa_ca_fname1 = tempfile.mkdtemp(suffix='ipa_ca.crt', dir=paths.TMP)    
469                                                                                 
470         ipa_csr = self.master.get_file_contents(paths.ROOT_IPA_CSR)             
471                                                                                 
472         external_ca = ExternalCA()                                              
473         root_ca = external_ca.create_ca(cn='RootCA1')                           
474         ipa_ca = external_ca.sign_csr(ipa_csr)                                  
475         self.master.put_file_contents(root_ca_fname1, root_ca)                  
476         self.master.put_file_contents(ipa_ca_fname1, ipa_ca)

tempfile.mkdtemp creates directory on the caller's host and then the test tries to save some content into the file on that path via tee. This cannot work.

This works 'fine' in PRCI due to a splitted controller and master.


Metadata Update from @slev:
- Issue assigned to slev

7 months ago

master:

  • 18456e7 ipatests: TestMultipleExternalCA: Create tempfiles on remote host

ipa-4-9:

  • 7480844 ipatests: TestMultipleExternalCA: Create tempfiles on remote host

Metadata Update from @rcritten:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

6 months ago

Login to comment on this ticket.

Metadata