tests: Fix some func tests to do with metadata maximums
Previously, if a cluster's combined configured max_meta_name_length and max_meta_value_length constraints were larger than the configured max_meta_overall_size, we would accidentally go over the overall size while intending to just test being exactly at the value length-limit. Change-Id: I42a5287011509e5b43959aab060f9ec7405ae5b9
This commit is contained in:
		@@ -796,6 +796,14 @@ class TestAccount(unittest.TestCase):
 | 
			
		||||
                         'k' * self.max_meta_name_length): 'v'})
 | 
			
		||||
        resp.read()
 | 
			
		||||
        self.assertEqual(resp.status, 204)
 | 
			
		||||
        # Clear it, so the value-length checking doesn't accidentally trip
 | 
			
		||||
        # the overall max
 | 
			
		||||
        resp = retry(post,
 | 
			
		||||
                     {'X-Account-Meta-' + (
 | 
			
		||||
                         'k' * self.max_meta_name_length): ''})
 | 
			
		||||
        resp.read()
 | 
			
		||||
        self.assertEqual(resp.status, 204)
 | 
			
		||||
 | 
			
		||||
        resp = retry(
 | 
			
		||||
            post,
 | 
			
		||||
            {'X-Account-Meta-' + ('k' * (
 | 
			
		||||
 
 | 
			
		||||
@@ -407,6 +407,13 @@ class TestContainer(unittest.TestCase):
 | 
			
		||||
            {'X-Container-Meta-' + ('k' * self.max_meta_name_length): 'v'})
 | 
			
		||||
        resp.read()
 | 
			
		||||
        self.assertEqual(resp.status, 204)
 | 
			
		||||
        # Clear it, so the value-length checking doesn't accidentally trip
 | 
			
		||||
        # the overall max
 | 
			
		||||
        resp = retry(
 | 
			
		||||
            post,
 | 
			
		||||
            {'X-Container-Meta-' + ('k' * self.max_meta_name_length): ''})
 | 
			
		||||
        resp.read()
 | 
			
		||||
        self.assertEqual(resp.status, 204)
 | 
			
		||||
        resp = retry(
 | 
			
		||||
            post,
 | 
			
		||||
            {'X-Container-Meta-' + (
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user