def setUp(self):
     """
     Reset all environment and start all servers.
     """
     (self.pids, self.port2server, self.account_ring, self.container_ring,
      self.object_ring, self.url, self.token,
      self.account, self.configs) = reset_environment()
    def setUp(self):
        """
        Reset all environment and start all servers.
        """
        (self.pids, self.port2server, self.account_ring, self.container_ring,
         self.object_ring, self.policy, self.url, self.token,
         self.account, self.configs) = reset_environment()
        self.container_name = 'container-%s' % uuid.uuid4()
        self.object_name = 'object-%s' % uuid.uuid4()
        self.brain = BrainSplitter(self.url, self.token, self.container_name,
                                   self.object_name, 'object')
        self.tempdir = mkdtemp()
        conf_path = os.path.join(self.tempdir, 'internal_client.conf')
        conf_body = """
        [DEFAULT]
        swift_dir = /etc/swift

        [pipeline:main]
        pipeline = catch_errors cache proxy-server

        [app:proxy-server]
        use = egg:swift#proxy
        object_post_as_copy = false

        [filter:cache]
        use = egg:swift#memcache

        [filter:catch_errors]
        use = egg:swift#catch_errors
        """
        with open(conf_path, 'w') as f:
            f.write(dedent(conf_body))
        self.int_client = internal_client.InternalClient(conf_path, 'test', 1)
 def setUp(self):
     """
     Reset all environment and start all servers.
     """
     (self.pids, self.port2server, self.account_ring, self.container_ring,
      self.object_ring, self.policy, self.url, self.token,
      self.account, self.configs) = reset_environment()
    def setUp(self):
        """
        Reset all environment and start all servers.
        """
        (self.pids, self.port2server, self.account_ring, self.container_ring,
         self.object_ring, self.policy, self.url, self.token, self.account,
         self.configs) = reset_environment()
        self.container_name = 'container-%s' % uuid.uuid4()
        self.object_name = 'object-%s' % uuid.uuid4()
        self.brain = BrainSplitter(self.url, self.token, self.container_name,
                                   self.object_name, 'object')
        self.tempdir = mkdtemp()
        conf_path = os.path.join(self.tempdir, 'internal_client.conf')
        conf_body = """
        [DEFAULT]
        swift_dir = /etc/swift

        [pipeline:main]
        pipeline = catch_errors cache proxy-server

        [app:proxy-server]
        use = egg:swift#proxy
        object_post_as_copy = false

        [filter:cache]
        use = egg:swift#memcache

        [filter:catch_errors]
        use = egg:swift#catch_errors
        """
        with open(conf_path, 'w') as f:
            f.write(dedent(conf_body))
        self.int_client = internal_client.InternalClient(conf_path, 'test', 1)
    def setUp(self):
	try:
        	self.pids, self.port2server, self.account_ring, self.container_ring, \
           		self.object_ring, self.url, self.token, self.account = \
                		reset_environment()
	except:
		raise SkipTest
示例#6
0
 def setUp(self):
     if len(POLICIES) < 2:
         raise SkipTest()
     (self.pids, self.port2server, self.account_ring, self.container_ring,
      self.object_ring, self.policy, self.url, self.token, self.account,
      self.configs) = reset_environment()
     self.container_name = 'container-%s' % uuid.uuid4()
     self.object_name = 'object-%s' % uuid.uuid4()
     self.brain = BrainSplitter(self.url, self.token, self.container_name,
                                self.object_name, 'container')
 def setUp(self):
     if len(POLICIES) < 2:
         raise SkipTest()
     (self.pids, self.port2server, self.account_ring, self.container_ring,
      self.object_ring, self.policy, self.url, self.token,
      self.account, self.configs) = reset_environment()
     self.container_name = 'container-%s' % uuid.uuid4()
     self.object_name = 'object-%s' % uuid.uuid4()
     self.brain = BrainSplitter(self.url, self.token, self.container_name,
                                self.object_name, 'container')
 def setUp(self):
     (
         self.pids,
         self.port2server,
         self.account_ring,
         self.container_ring,
         self.object_ring,
         self.url,
         self.token,
         self.account,
         self.configs,
     ) = reset_environment()
示例#9
0
    def setUp(self):
        if len(POLICIES) < 2:
            raise SkipTest('Need more than one policy')

        self.expirer = Manager(['object-expirer'])
        self.expirer.start()
        err = self.expirer.stop()
        if err:
            raise SkipTest('Unable to verify object-expirer service')

        conf_files = []
        for server in self.expirer.servers:
            conf_files.extend(server.conf_files())
        conf_file = conf_files[0]
        self.client = InternalClient(conf_file, 'probe-test', 3)

        (self.pids, self.port2server, self.account_ring, self.container_ring,
         self.object_ring, self.policy, self.url, self.token,
         self.account, self.configs) = reset_environment()
        self.container_name = 'container-%s' % uuid.uuid4()
        self.object_name = 'object-%s' % uuid.uuid4()
        self.brain = BrainSplitter(self.url, self.token, self.container_name,
                                   self.object_name)
示例#10
0
    def setUp(self):
        if len(POLICIES) < 2:
            raise SkipTest('Need more than one policy')

        self.expirer = Manager(['object-expirer'])
        self.expirer.start()
        err = self.expirer.stop()
        if err:
            raise SkipTest('Unable to verify object-expirer service')

        conf_files = []
        for server in self.expirer.servers:
            conf_files.extend(server.conf_files())
        conf_file = conf_files[0]
        self.client = InternalClient(conf_file, 'probe-test', 3)

        (self.pids, self.port2server, self.account_ring, self.container_ring,
         self.object_ring, self.policy, self.url, self.token, self.account,
         self.configs) = reset_environment()
        self.container_name = 'container-%s' % uuid.uuid4()
        self.object_name = 'object-%s' % uuid.uuid4()
        self.brain = BrainSplitter(self.url, self.token, self.container_name,
                                   self.object_name)
示例#11
0
 def setUp(self):
     self.pids, self.port2server, self.account_ring, self.container_ring, \
         self.object_ring, self.url, self.token, self.account = \
             reset_environment()
示例#12
0
 def setUp(self):
     (self.pids, self.port2server, self.account_ring, self.container_ring,
      self.object_ring, self.policy, self.url, self.token,
      self.account, self.configs) = reset_environment()
 def setUp(self):
     (self.pids, self.port2server, self.account_ring, self.container_ring,
      self.object_ring, self.url, self.token,
      self.account, self.configs) = reset_environment()
     self.url, self.token = get_auth(
         'http://127.0.0.1:8080/auth/v1.0', 'admin:admin', 'admin')
示例#14
0
 def setUp(self):
     (self.pids, self.port2server, self.account_ring, self.container_ring,
      self.object_ring, self.policy, self.url, self.token,
      self.account, self.configs) = reset_environment()
     self.url, self.token = get_auth(
         'http://127.0.0.1:8080/auth/v1.0', 'admin:admin', 'admin')
示例#15
0
 def setUp(self):
     (self.pids, self.port2server, self.account_ring, self.container_ring,
      self.object_ring, self.policy, self.url, self.token, self.account,
      self.configs) = reset_environment()
     self.realm, self.cluster = get_current_realm_cluster(self.url)
示例#16
0
 def setUp(self):
     (self.pids, self.port2server, self.account_ring, self.container_ring,
      self.object_ring, self.policy, self.url, self.token,
      self.account, self.configs) = reset_environment()
     self.realm, self.cluster = get_current_realm_cluster(self.url)