Ejemplo n.º 1
0
    def setUp2(self, backend_class, backend_fs_name):
        
        options = Namespace()
        options.no_ssl = False
        options.ssl_ca_path = None

        (backend_login, backend_password,
         fs_name) = get_remote_test_info(backend_fs_name, self.skipTest)
        
        self.backend = backend_class(fs_name, backend_login, backend_password,
                                     ssl_context=get_ssl_context(options))

        try:
            self.backend.fetch('empty_object')
        except DanglingStorageURLError:
            raise unittest.SkipTest('Bucket %s does not exist' % fs_name) from None
        except AuthorizationError:
            raise unittest.SkipTest('No permission to access %s' % fs_name) from None
        except AuthenticationError:
            raise unittest.SkipTest('Unable to access %s, invalid credentials or skewed '
                                    'system clock?' % fs_name) from None
        except NoSuchObject:
            pass
        else:
            raise unittest.SkipTest('Test bucket not empty') from None
Ejemplo n.º 2
0
    def setUp(self):
        super().setUp()
        (backend_login, backend_pw,
         self.storage_url) = get_remote_test_info('gs-test', self.skipTest)
        self.backend_login = backend_login
        self.backend_passphrase = backend_pw

        options = Namespace()
        options.no_ssl = False
        options.ssl_ca_path = None

        self.backend = gs.Backend(self.storage_url, backend_login, backend_pw,
                                  ssl_context=get_ssl_context(options))
Ejemplo n.º 3
0
    def setUp(self):
        super().setUp()
        (backend_login, backend_pw,
         self.storage_url) = get_remote_test_info('gs-test', self.skipTest)
        self.backend_login = backend_login
        self.backend_passphrase = backend_pw

        options = Namespace()
        options.no_ssl = False
        options.ssl_ca_path = None

        self.backend = gs.Backend(self.storage_url,
                                  backend_login,
                                  backend_pw,
                                  ssl_context=get_ssl_context(options))
Ejemplo n.º 4
0
    def setUp2(self, backend_class, backend_fs_name):

        options = Namespace()
        options.no_ssl = False
        options.ssl_ca_path = None

        (backend_login, backend_password, fs_name) = get_remote_test_info(backend_fs_name, self.skipTest)

        self.backend = backend_class(fs_name, backend_login, backend_password, ssl_context=get_ssl_context(options))

        try:
            self.backend.fetch("empty_object")
        except DanglingStorageURLError:
            raise unittest.SkipTest("Bucket %s does not exist" % fs_name) from None
        except AuthorizationError:
            raise unittest.SkipTest("No permission to access %s" % fs_name) from None
        except AuthenticationError:
            raise unittest.SkipTest(
                "Unable to access %s, invalid credentials or skewed " "system clock?" % fs_name
            ) from None
        except NoSuchObject:
            pass
        else:
            raise unittest.SkipTest("Test bucket not empty") from None