Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch not showing created OpenSearch domains #8420

Open
jflim opened this issue Dec 19, 2024 · 0 comments
Open

Elasticsearch not showing created OpenSearch domains #8420

jflim opened this issue Dec 19, 2024 · 0 comments

Comments

@jflim
Copy link

jflim commented Dec 19, 2024

When calling list_domains with boto3: ElasticsearchService client, boto3 documentation mentions that the response includes domains of both Elasticsearch or Opensearch.

In my testing, I was able to use the boto3 elasticsearch client to see any OpenSearch domains that were created. But the moto elasticsearch client seems to only track elasticsearch domains.

Here's a test that shows the current results.

@mock_aws
def test_describe_opensearch_domain():
    opensearch_client = boto3.client("opensearch", region_name="us-east-2")
    status = opensearch_client.create_domain(DomainName="moto-opensearch")["DomainStatus"]
    assert status["Created"]
    assert "DomainId" in status
    assert "DomainName" in status
    assert status["DomainName"] == "moto-opensearch"

    # ensure that elasticsearch client can describe opensearch domains as well
    es_client = boto3.client("es", region_name="us-east-2")
    assert es_client.list_domain_names()["DomainNames"] != []

Expected Results

Test passes.

Actual Results

FAILED test_es.py::test_describe_opensearch_domain - assert [] != []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant