Sonins commented on a change in pull request #17428:
URL: https://github.com/apache/airflow/pull/17428#discussion_r685708706
##########
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:
OK, It turns out there is a little problem.
Without user and pass field, `<no+value>` is included in url string, like
this.
`http://<no+value>:<no+value>@elastichostname:2222`
It makes test fail.

My mistake, I should've tested for this before i committed it.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]