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



##########
File path: chart/tests/test_elasticsearch_secret.py
##########
@@ -132,3 +132,30 @@ def 
test_should_generate_secret_with_specified_schemes(self, scheme):
         )
 
         assert f"{scheme}://username:password@elastichostname:9200" == 
connection
+
+    @parameterized.expand(
+        [
+            # When both user and password are empty.
+            ({}, ""),
+            # When password is empty
+            ({"user": "admin"}, ""),
+            # When user is empty
+            ({"pass": "password"}, ""),
+            # Valid username/password
+            ({"user": "admin", "pass": "password"}, "admin:password"),
+        ],
+    )
+    def test_url_generated_when_user_pass_empty_combinations(self, 
extra_conn_kwargs, expected_user_info):
+        connection = self._get_connection(
+            {
+                "elasticsearch": {
+                    "enabled": True,
+                    "connection": {"host": "elastichostname", "port": 8080, 
**extra_conn_kwargs},
+                }
+            }
+        )
+
+        if not expected_user_info:
+            assert f"http://elastichostname:8080"; == connection

Review comment:
       ```suggestion
               assert "http://elastichostname:8080"; == connection
   ```
   
   Should fix the static check.




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


Reply via email to