Seems more like just a python thing, vs anything to do with Amulet. https://github.com/kennethreitz/requests/issues/2214 Says you can do some magic around disabled warnings
A better goal might be to have the charm optionally take the config of a cert to use and configure your tests to include that as a valid certificate. http://docs.python-requests.org/en/master/user/advanced/ Indicates a few ways you should be able to describe the certificate authority that you should trust. John =:-> On Mar 2, 2017 15:15, "Suchitra Venugopal1" <suchv...@in.ibm.com> wrote: > Hi > > I am trying to run the following amulet test on my charm where it > verifies a particular url. > > self.assertTrue(self.d.deployed) > unit = self.d.sentry['ibm-mobilefirst-server'][0] > url = 'http://%s:9081/appcenterconsole' % unit.info > ['public-address'] > https_url = 'https://%s:9443/appcenterconsole' % unit.info > ['public-address'] > print('Url is %s' % url) > response = requests.get(url, verify=False) > response = requests.get(https_url, verify=False) > # Raise an exception if the url was not a valid web page. > response.raise_for_status() > > > While running amulet, it throws an error as "InsecureRequestWarning: > Unverified HTTPS request is being made". Can anyone please let me know how > to resolve this ? > > E2017-03-02 01:00:38 Starting deployment of lxd-testing:admin/default > 2017-03-02 01:00:38 Deploying applications... > 2017-03-02 01:00:43 Config specifies num units for subordinate: > ibm-mobilefirst-server > 2017-03-02 01:00:44 Adding relations... > 2017-03-02 01:00:44 Deployment complete in 6.19 seconds > Url is http://<ip>:9081/appcenterconsole > <http://10.1.237.7:9081/appcenterconsole> > /usr/lib/python3/dist-packages/urllib3/connectionpool.py:794: > InsecureRequestWarning: Unverified HTTPS request is being made. Adding > certificate verification is strongly advised. See: > https://urllib3.readthedocs.org/en/latest/security.html > InsecureRequestWarning) > > I tried to install some additional packages as mentioned in the link > https://urllib3.readthedocs.org/en/latest/security.html. But that doesn't > help. > > *Suchitra Venugopal* > > *Project ManagerJuju Charms* > ------------------------------ > *Phone: **+91-80-494-93581* > *Mobile: **+91-966-312-6000* > *E-mail: **suchv...@in.ibm.com* <suchv...@in.ibm.com> > *Product Transformation Centre* <http://ptc.hursley.ibm.com/ptcshop/> > > *INDIA SOFTWARE LABS, IBM SYSTEMS,EGL C, 6th FLOOR, BANGALORE* > > > > -- > Juju mailing list > Juju@lists.ubuntu.com > Modify settings or unsubscribe at: https://lists.ubuntu.com/ > mailman/listinfo/juju > >
-- Juju mailing list Juju@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju