Ejemplo n.º 1
0
 def setUp(self):
     super(GcpCloudRedisTestCase, self).setUp()
     with mock.patch.object(util.GcloudCommand,
                            'Issue',
                            return_value=('{}', '', 0)):
         FLAGS.project = 'project'
         FLAGS.zone = ['us-central1-a']
         mock_spec = mock.Mock()
         self.redis = gcp_cloud_redis.CloudRedis(mock_spec)
Ejemplo n.º 2
0
 def setUp(self):
     mocked_flags = mock_flags.MockFlags()
     mocked_flags.project = 'project'
     mock_spec = mock.Mock(spec=benchmark_config_spec._CloudRedisSpec)
     mock_spec.redis_name = 'foobar'
     mock_spec.redis_tier = 'tier'
     mock_spec.redis_size_gb = 5
     mock_spec.redis_version = 'version'
     with mock_flags.PatchFlags(mocked_flags):
         self.redis = gcp_cloud_redis.CloudRedis(mock_spec)
Ejemplo n.º 3
0
 def setUp(self):
     super(GcpCloudRedisTestCase, self).setUp()
     FLAGS.project = 'project'
     FLAGS.redis_failover_style = cloud_redis.Failover.FAILOVER_NONE
     mock_spec = mock.Mock(spec=benchmark_config_spec._CloudRedisSpec)
     mock_spec.redis_name = 'foobar'
     mock_spec.redis_tier = 'tier'
     mock_spec.redis_size_gb = 5
     mock_spec.redis_version = 'version'
     mock_spec.client_vm = mock.Mock()
     self.redis = gcp_cloud_redis.CloudRedis(mock_spec)
Ejemplo n.º 4
0
 def setUp(self):
     mocked_flags = mock_flags.MockFlags()
     mocked_flags.project = 'project'
     mocked_flags.redis_failover_style = cloud_redis.Failover.FAILOVER_NONE
     mock_spec = mock.Mock(spec=benchmark_config_spec._CloudRedisSpec)
     mock_spec.redis_name = 'foobar'
     mock_spec.redis_tier = 'tier'
     mock_spec.redis_size_gb = 5
     mock_spec.redis_version = 'version'
     mock_spec.client_vm = mock.Mock()
     with mock_flags.PatchFlags(mocked_flags):
         self.redis = gcp_cloud_redis.CloudRedis(mock_spec)
 def setUp(self):
     super(GcpCloudRedisTestCase, self).setUp()
     FLAGS.project = 'project'
     FLAGS.zones = ['us-central1-a']
     mock_spec = mock.Mock()
     self.redis = gcp_cloud_redis.CloudRedis(mock_spec)