@@ -12,7 +12,8 @@ class OpenSearchContainer(DockerContainer):
12
12
between makes sure that the newly created document is available for search.
13
13
14
14
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.
16
17
17
18
Example:
18
19
@@ -47,16 +48,16 @@ def __init__(self, image: str = "opensearchproject/opensearch:2.4.0",
47
48
48
49
def get_config (self ) -> dict :
49
50
"""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.
51
52
52
53
Returns:
53
- dict: {`host`: str, `port`: str, `user `: str, `password`: str}
54
+ dict: {`host`: str, `port`: str, `username `: str, `password`: str}
54
55
"""
55
56
56
57
return {
57
58
"host" : self .get_container_host_ip (),
58
59
"port" : self .get_exposed_port (self .port_to_expose ),
59
- "user " : "admin" ,
60
+ "username " : "admin" ,
60
61
"password" : "admin" ,
61
62
}
62
63
@@ -75,7 +76,7 @@ def get_client(self, verify_certs: bool = False, **kwargs) -> OpenSearch:
75
76
"port" : config ["port" ],
76
77
}
77
78
],
78
- http_auth = (config ["user " ], config ["password" ]),
79
+ http_auth = (config ["username " ], config ["password" ]),
79
80
use_ssl = self .security_enabled ,
80
81
verify_certs = verify_certs ,
81
82
** kwargs ,
0 commit comments