]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/rgw: s3test task overrides REQUESTS_CA_BUNDLE to use system certs
authorCasey Bodley <cbodley@redhat.com>
Thu, 15 Feb 2018 15:40:35 +0000 (10:40 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 9 Mar 2018 21:31:33 +0000 (16:31 -0500)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
qa/tasks/s3tests.py

index b6f4cf33019fa3e3be169cba06d99d75687b3e75..ce2871ec05283ec62529414051c9076a60ceaf49 100644 (file)
@@ -233,9 +233,19 @@ def run_tests(ctx, config):
     if ctx.rgw.frontend == 'beast':
         attrs.append("!fails_strict_rfc2616")
     for client, client_config in config.iteritems():
+        (remote,) = ctx.cluster.only(client).remotes.keys()
         args = [
             'S3TEST_CONF={tdir}/archive/s3-tests.{client}.conf'.format(tdir=testdir, client=client),
-            'BOTO_CONFIG={tdir}/boto.cfg'.format(tdir=testdir),
+            'BOTO_CONFIG={tdir}/boto.cfg'.format(tdir=testdir)
+            ]
+        # the 'requests' library comes with its own ca bundle to verify ssl
+        # certificates - override that to use the system's ca bundle, which
+        # is where the ssl task installed this certificate
+        if remote.os.package_type == 'deb':
+            args += ['REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt']
+        else:
+            args += ['REQUESTS_CA_BUNDLE=/etc/pki/tls/certs/ca-bundle.crt']
+        args += [
             '{tdir}/s3-tests/virtualenv/bin/nosetests'.format(tdir=testdir),
             '-w',
             '{tdir}/s3-tests'.format(tdir=testdir),
@@ -245,7 +255,7 @@ def run_tests(ctx, config):
         if client_config is not None and 'extra_args' in client_config:
             args.extend(client_config['extra_args'])
 
-        ctx.cluster.only(client).run(
+        remote.run(
             args=args,
             label="s3 tests against rgw"
             )