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 2021/08/09 15:56:06 UTC

[GitHub] [airflow] jedcunningham commented on a change in pull request #17428: Fix elasticsearch-secret template port default function

jedcunningham commented on a change in pull request #17428:
URL: https://github.com/apache/airflow/pull/17428#discussion_r685317827



##########
File path: chart/tests/test_elasticsearch_secret.py
##########
@@ -96,3 +96,24 @@ def test_should_correctly_handle_password_with_special_characters(self):
             "http://username%21%40%23$%25%25%5E&%2A%28%29:password%21%40%23$%25%25%5E&%2A%28%29@"
             "elastichostname:80" == connection
         )
+
+    def test_should_generate_secret_with_specified_port(self):
+        connection = self._get_connection(
+            {
+                "elasticsearch": {
+                    "enabled": True,
+                    "connection": {
+                        "user": "username!@#$%%^&*()",
+                        "pass": "password!@#$%%^&*()",
+                        "host": "elastichostname",
+                        "port": 9200,
+                    },
+                }
+            }
+        )
+
+        assert (
+            "http://username%21%40%23$%25%25%5E&%2A%28%29:password%21%40%23$%25%25%5E&%2A%28%29@"
+            "elastichostname:9200" == connection
+        )

Review comment:
       ```suggestion
                           "host": "elastichostname",
                           "port": 2222,
                       },
                   }
               }
           )
   
           assert "http://elastichostname:2222" == connection
   ```
   
   Let's keep it simple and also use a non-default port?




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org