Skip to content

Commit 043dea0

Browse files
committed
Rename user to username in opensearch.
1 parent e8e4078 commit 043dea0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

opensearch/testcontainers/opensearch/__init__.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ class OpenSearchContainer(DockerContainer):
1212
between makes sure that the newly created document is available for search.
1313
1414
The method :code:`get_client` can be used to create a OpenSearch Python Client. The method
15-
:code:`get_config` can be used to retrieve the host, port, user, and password of the container.
15+
:code:`get_config` can be used to retrieve the host, port, username, and password of the
16+
container.
1617
1718
Example:
1819
@@ -47,16 +48,16 @@ def __init__(self, image: str = "opensearchproject/opensearch:2.4.0",
4748

4849
def get_config(self) -> dict:
4950
"""This method returns the configuration of the OpenSearch container,
50-
including the host, port, user, and password.
51+
including the host, port, username, and password.
5152
5253
Returns:
53-
dict: {`host`: str, `port`: str, `user`: str, `password`: str}
54+
dict: {`host`: str, `port`: str, `username`: str, `password`: str}
5455
"""
5556

5657
return {
5758
"host": self.get_container_host_ip(),
5859
"port": self.get_exposed_port(self.port_to_expose),
59-
"user": "admin",
60+
"username": "admin",
6061
"password": "admin",
6162
}
6263

@@ -75,7 +76,7 @@ def get_client(self, verify_certs: bool = False, **kwargs) -> OpenSearch:
7576
"port": config["port"],
7677
}
7778
],
78-
http_auth=(config["user"], config["password"]),
79+
http_auth=(config["username"], config["password"]),
7980
use_ssl=self.security_enabled,
8081
verify_certs=verify_certs,
8182
**kwargs,

0 commit comments

Comments
 (0)