danielpoonwj commented on a change in pull request #6901: [AIRFLOW-6345] Ensure 
arguments to ProxyFix are integers
URL: https://github.com/apache/airflow/pull/6901#discussion_r361382404
 
 

 ##########
 File path: tests/www/test_app.py
 ##########
 @@ -36,23 +36,23 @@ def test_constructor_no_proxyfix(self):
     def test_constructor_proxyfix(self):
         app, _ = application.create_app(session=Session, testing=True)
         self.assertTrue(isinstance(app.wsgi_app, ProxyFix))
-        self.assertEqual(app.wsgi_app.x_for, '1')
-        self.assertEqual(app.wsgi_app.x_proto, '1')
-        self.assertEqual(app.wsgi_app.x_host, '1')
-        self.assertEqual(app.wsgi_app.x_port, '1')
-        self.assertEqual(app.wsgi_app.x_prefix, '1')
+        self.assertEqual(app.wsgi_app.x_for, 1)
+        self.assertEqual(app.wsgi_app.x_proto, 1)
+        self.assertEqual(app.wsgi_app.x_host, 1)
+        self.assertEqual(app.wsgi_app.x_port, 1)
+        self.assertEqual(app.wsgi_app.x_prefix, 1)
 
     @conf_vars({('webserver', 'enable_proxy_fix'): 'True',
-                ('webserver', 'proxy_fix_x_for'): '3',
-                ('webserver', 'proxy_fix_x_proto'): '4',
-                ('webserver', 'proxy_fix_x_host'): '5',
-                ('webserver', 'proxy_fix_x_port'): '6',
-                ('webserver', 'proxy_fix_x_prefix'): '7'})
+                ('webserver', 'proxy_fix_x_for'): 3,
 
 Review comment:
   looks like the CI failure is because these values need to be strings - 
reverting changes for this portion should work

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to