Browse Source

Update L7-proxy gate to allow new Octavia features

Specifically: UDP is now a valid protocol, and session_persistence has
some new fields.

Change-Id: I6f2ab6cad89714773655481a17a88348900261ad
Adam Harwell 7 months ago
parent
commit
28ede08e8c

+ 1
- 1
neutron_lbaas/tests/tempest/v2/api/test_listeners_non_admin.py View File

@@ -184,7 +184,7 @@ class ListenersTestJSON(base.BaseTestCase):
184 184
                           self._create_listener,
185 185
                           loadbalancer_id=self.load_balancer_id,
186 186
                           protocol_port=self.port,
187
-                          protocol="UDP")
187
+                          protocol="PIGEON")
188 188
         self._check_status_tree(load_balancer_id=self.load_balancer_id,
189 189
                                 listener_ids=[self.listener_id])
190 190
 

+ 10
- 3
neutron_lbaas/tests/tempest/v2/api/test_pools_admin.py View File

@@ -128,7 +128,9 @@ class TestPools(base.BaseAdminTestCase):
128 128
         self._update_pool(new_pool.get('id'),
129 129
                           session_persistence=session_persistence)
130 130
         pool = self.pools_client.get_pool(new_pool.get('id'))
131
-        self.assertEqual(session_persistence, pool.get('session_persistence'))
131
+        result_sp = pool.get('session_persistence')
132
+        for key in session_persistence:
133
+            self.assertEqual(session_persistence[key], result_sp[key])
132 134
 
133 135
     def test_update_pool_sesssion_persistence_app_to_http(self):
134 136
         """
@@ -141,13 +143,18 @@ class TestPools(base.BaseAdminTestCase):
141 143
         self._update_pool(new_pool.get('id'),
142 144
                           session_persistence=session_persistence)
143 145
         pool = self.pools_client.get_pool(new_pool.get('id'))
144
-        self.assertEqual(session_persistence, pool.get('session_persistence'))
146
+        result_sp = pool.get('session_persistence')
147
+        for key in session_persistence:
148
+            self.assertEqual(session_persistence[key], result_sp[key])
149
+
145 150
         self._update_pool(new_pool.get('id'),
146 151
                           session_persistence={"type": "HTTP_COOKIE"})
147 152
         pool = self.pools_client.get_pool(new_pool.get('id'))
148 153
         session_persistence = {"type": "HTTP_COOKIE",
149 154
                                "cookie_name": None}
150
-        self.assertEqual(session_persistence, pool.get('session_persistence'))
155
+        result_sp = pool.get('session_persistence')
156
+        for key in session_persistence:
157
+            self.assertEqual(session_persistence[key], result_sp[key])
151 158
 
152 159
     @decorators.attr(type='smoke')
153 160
     def test_delete_pool(self):

+ 1
- 1
neutron_lbaas/tests/tempest/v2/api/test_pools_non_admin.py View File

@@ -209,7 +209,7 @@ class TestPools(base.BaseTestCase):
209 209
     def test_create_pool_invalid_protocol(self):
210 210
         """Test create pool with an invalid protocol"""
211 211
         self.assertRaises(ex.BadRequest, self._create_pool,
212
-                          protocol='UDP',
212
+                          protocol='PIGEON',
213 213
                           lb_algorithm='ROUND_ROBIN',
214 214
                           listener_id=self.listener['id'])
215 215
 

Loading…
Cancel
Save