You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/12/26 06:50:07 UTC

[GitHub] [airflow] danielpoonwj commented on a change in pull request #6901: [AIRFLOW-6345] Ensure arguments to ProxyFix are integers

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:
users@infra.apache.org


With regards,
Apache Git Services