#8559 Nightly test failure in test_trust.py::TestTrust::test_password_login_as_aduser
Closed: fixed 5 months ago by frenaud. Opened 5 months ago by frenaud.

The nightly test test_trust.py::TestTrust::test_password_login_as_aduser is faling on the master branch + fedora 32 with the following output:

self = <ipatests.test_integration.test_trust.TestTrust object at 0x7f62cdb5a040>

    def test_password_login_as_aduser(self):
        """Test if AD user can login with password to Web UI"""
        ad_admin = 'Administrator@%s' % self.ad_domain

        tasks.kdestroy_all(self.master)
        user_and_password = ('user=%s&password=%s' %
                             (ad_admin, self.master.config.ad_admin_password))
        host = self.master.hostname
        cmd_args = [
            paths.BIN_CURL,
            '-v',
            '-H', 'referer:https://{}/ipa'.format(host),
            '-H', 'Content-Type:application/x-www-form-urlencoded',
            '-H', 'Accept:text/plain',
            '--cacert', paths.IPA_CA_CRT,
            '--data', user_and_password,
            'https://{}/ipa/session/login_password'.format(host)]
        result = self.master.run_command(cmd_args)
>       assert "Set-Cookie: ipa_session=MagBearerToken" in result.stdout_text
E       AssertionError: assert 'Set-Cookie: ipa_session=MagBearerToken' in ''
E        +  where '' = <pytest_multihost.transport.SSHCommand object at 0x7f62cdb768e0>.stdout_text

test_integration/test_trust.py:196: AssertionError
 -------------------------------Captured log call-------------------------------- 
INFO     ipatests.pytest_ipa.integration.host.Host.master.IPAOpenSSHTransport:transport.py:391 RUN ['kdestroy', '-A']
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd141:transport.py:513 RUN ['kdestroy', '-A']
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd141:transport.py:217 Exit code: 0
INFO     ipatests.pytest_ipa.integration.host.Host.master.IPAOpenSSHTransport:transport.py:391 RUN ['/usr/bin/curl', '-v', '-H', 'referer:https://master.ipa.test/ipa', '-H', 'Content-Type:application/x-www-form-urlencoded', '-H', 'Accept:text/plain', '--cacert', '/etc/ipa/ca.crt', '--data', 'user=Administrator@ad.test&password=Secret123', 'https://master.ipa.test/ipa/session/login_password']
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:513 RUN ['/usr/bin/curl', '-v', '-H', 'referer:https://master.ipa.test/ipa', '-H', 'Content-Type:application/x-www-form-urlencoded', '-H', 'Accept:text/plain', '--cacert', '/etc/ipa/ca.crt', '--data', 'user=Administrator@ad.test&password=Secret123', 'https://master.ipa.test/ipa/session/login_password']
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557                                  Dload  Upload   Total   Spent    Left  Speed
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 192.168.122.56:443...
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * Connected to master.ipa.test (192.168.122.56) port 443 (#0)
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * ALPN, offering h2
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * ALPN, offering http/1.1
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * successfully set certificate verify locations:
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 *   CAfile: /etc/ipa/ca.crt
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557   CApath: none
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 } [5 bytes data]
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * TLSv1.3 (OUT), TLS handshake, Client hello (1):
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 } [512 bytes data]
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * TLSv1.3 (IN), TLS handshake, Server hello (2):
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 { [122 bytes data]
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 { [25 bytes data]
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * TLSv1.3 (IN), TLS handshake, Certificate (11):
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 { [2490 bytes data]
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * TLSv1.3 (IN), TLS handshake, CERT verify (15):
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 { [264 bytes data]
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * TLSv1.3 (IN), TLS handshake, Finished (20):
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 { [52 bytes data]
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 } [1 bytes data]
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * TLSv1.3 (OUT), TLS handshake, Finished (20):
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 } [52 bytes data]
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * ALPN, server accepted to use http/1.1
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * Server certificate:
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 *  subject: O=IPA.TEST; CN=master.ipa.test
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 *  start date: Oct 31 11:02:55 2020 GMT
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 *  expire date: Nov  1 11:02:55 2022 GMT
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 *  subjectAltName: host "master.ipa.test" matched cert's "master.ipa.test"
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 *  issuer: O=IPA.TEST; CN=Certificate Authority
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 *  SSL certificate verify ok.
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 } [5 bytes data]
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 > POST /ipa/session/login_password HTTP/1.1
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 > Host: master.ipa.test
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 > User-Agent: curl/7.69.1
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 > referer:https://master.ipa.test/ipa
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 > Content-Type:application/x-www-form-urlencoded
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 > Accept:text/plain
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 > Content-Length: 45
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 > 
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 } [45 bytes data]
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * upload completely sent off: 45 out of 45 bytes
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 { [5 bytes data]
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 { [281 bytes data]
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 { [281 bytes data]
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * old SSL session ID is stale, removing
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 { [5 bytes data]
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * Mark bundle as not supporting multiuse
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 < HTTP/1.1 200 Success
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 < Date: Sat, 31 Oct 2020 11:08:32 GMT
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 < Server: Apache/2.4.46 (Fedora) OpenSSL/1.1.1g mod_wsgi/4.6.8 Python/3.8 mod_auth_gssapi/1.6.1
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 < Set-Cookie: ipa_session=MagBearerToken=6m%2bzhGARccS7f6Fwd4%2fUG1dKYUQGlCu3r3tiJZSLct5QWlP2s871fY3Og41vLlmZvb%2bqHpY73YZV6NYiK4aUVCjSriVwFYwEui4YZ1xjv8QiRiUP7%2fX1W1B6CJ3G2roxqT9%2fOJefUIaFNckZcMu4fim6rzDx5Vc%2fUnTWqTVDN8AlBfesdGCRDCME9wUHpbnHsvADCYS7LEUKhIq66e1nAg%3d%3d;path=/ipa;httponly;secure;
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 < X-Frame-Options: DENY
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 < Content-Security-Policy: frame-ancestors 'none'
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 < Cache-Control: no-cache, private
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 < Vary: Accept-Encoding
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 < Transfer-Encoding: chunked
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 < Content-Type: text/plain; charset=UTF-8
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 < 
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 
100    45    0     0  100    45      0     83 --:--:-- --:--:-- --:--:--    83{ [5 bytes data]
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 
100    45    0     0  100    45      0     83 --:--:-- --:--:-- --:--:--    83
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:557 * Connection #0 to host master.ipa.test left intact
DEBUG    ipatests.pytest_ipa.integration.host.Host.master.cmd142:transport.py:217 Exit code: 0

See the PR #505 with report and logs.

Probably curl is writing the expected output in stderr rather than stdout.


Metadata Update from @frenaud:
- Issue assigned to frenaud

5 months ago

Metadata Update from @frenaud:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/5223

5 months ago

master:

  • c053b5e ipatests: curl outputs the cookie in stderr and not in sdtout

ipa-4-8:

  • 71f46d6 ipatests: curl outputs the cookie in stderr and not in sdtout

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

5 months ago

Login to comment on this ticket.

Metadata