Description of problem: When there is authenticated proxy used on insights client, the test-connection throws with incorrect error # redhat-access-insights --test-connection --verbose 2018-12-02 07:29:14,228 DEBUG insights.client.client Logging initialized 2018-12-02 07:29:14,228 DEBUG root Loaded initial egg: /var/lib/insights/last_stable.egg/insights 2018-12-02 07:29:14,228 DEBUG insights.client /usr/bin/gpg --verify --keyring /etc/insights-client/redhattools.pub.gpg /var/lib/insights/last_stable.egg.asc /var/lib/insights/last_stable.egg 2018-12-02 07:29:14,237 DEBUG insights.client GPG return code: 0 2018-12-02 07:29:14,551 DEBUG insights.client.client Logging initialized 2018-12-02 07:29:14,551 INFO insights.client.phase.v1 Running Connection Tests... 2018-12-02 07:29:14,551 DEBUG insights.client.connection NO PROXY: None 2018-12-02 07:29:14,551 DEBUG insights.client.connection CONF Proxy: http://proxy.example.com:1234 2018-12-02 07:29:14,557 ERROR insights.client.connection Connection test config: 2018-12-02 07:29:14,557 DEBUG insights.client.connection Proxy config: {'https': 'http://proxy.example.com:1234'} 2018-12-02 07:29:14,557 DEBUG insights.client.connection Certificate Verification: /etc/insights-client/cert-api.access.redhat.com.pem 2018-12-02 07:29:14,557 INFO insights.client.connection === Begin Certificate Chain Test === 2018-12-02 07:29:14,563 ERROR insights.client.connection Failed to connect to https://cert-api.access.redhat.com/r/insights. Invalid hostname. 2018-12-02 07:29:14,563 INFO insights.client.connection === End Certificate Chain Test: FAILURE === Here we can see that the error message is: Failed to connect to https://cert-api.access.redhat.com/r/insights. Invalid hostname. The proper error message should be thrown on the console. How reproducible: When there is an issue with the internet connection. Steps to Reproduce: 1. Setup Insights client to connect via authenticated HTTP Proxy 2. Try to run insights-client --test-connection Actual results: "Begin Certificate Chain Test" fails with below error, the error message is incorrect. Failed to connect to https://cert-api.access.redhat.com/r/insights. Invalid hostname. Expected results: A proper and correct error message should be displayed. Additional info:
This test was removed from the connection tests.