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

[BUG] Multi data source test url is a fake endpoint #1202

Open
BionIT opened this issue Apr 2, 2024 · 7 comments
Open

[BUG] Multi data source test url is a fake endpoint #1202

BionIT opened this issue Apr 2, 2024 · 7 comments
Assignees
Labels
bug Something isn't working v2.15.0

Comments

@BionIT
Copy link

BionIT commented Apr 2, 2024

What is the bug?

The OSD_TEST_DOMAIN_ENDPOINT_URL used in cypress tests, eg. https://github.com/opensearch-project/opensearch-dashboards-functional-test/blob/main/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/datasource-management-plugin/1_create_datasource.spec.js#L8C3-L8C31 is https://opensearch.org which is not actual data source endpoint (see https://github.com/opensearch-project/opensearch-dashboards-functional-test/blob/main/cypress/utils/dashboards/datasource-management-dashboards-plugin/constants.js#L7). Test connection would fail

How can one reproduce the bug?

Check the link above

What is the expected behavior?

We should use the port from docker container or a read endpoint with credentials passed via secrets

What is your host/environment?

Operating system, version.

Do you have any screenshots?

If applicable, add screenshots to help explain your problem.

Do you have any additional context?

Add any other context about the problem.

@zhongnansu
Copy link
Member

Since we can't use an real permanent endpoint, we probably need to find a way to spin up an OS cluster through cypress, and use that as datasource.

@seraphjiang
Copy link
Member

Since we can't use an real permanent endpoint, we probably need to find a way to spin up an OS cluster through cypress, and use that as datasource.

Why not create one and keep reusing it

@zhongnansu
Copy link
Member

Since we can't use an real permanent endpoint, we probably need to find a way to spin up an OS cluster through cypress, and use that as datasource.

Why not create one and keep reusing it

@seraphjiang Do you mean for example we create an Amazon OpenSearch domain and reuse this real endpoint as datasource in cypress test? Since cypress tests might need to read/write data in the datasource, we can't let everyone have open access to a public domain

@BionIT
Copy link
Author

BionIT commented Apr 23, 2024

@zhongnansu Since Derek's change has been merged in, can we use the workflow he added to spin off opensearch cluster and use the local cluster as the data source? I saw security plugin already uses it in their cypress test

@zhongnansu
Copy link
Member

@zhongnansu Since Derek's change has been merged in, can we use the workflow he added to spin off opensearch cluster and use the local cluster as the data source? I saw security plugin already uses it in their cypress test

@BionIT Yes, we can. However for current test suites of multiple datasource, we don't have any test that actually requires an endpoint to be valid. I can work on adding some more test maybe around test data source connection, which needs a valid endpoint.

@kavilla
Copy link
Member

kavilla commented May 8, 2024

@BionIT is this for 2.14 or completed?

@kavilla
Copy link
Member

kavilla commented May 8, 2024

Pinged @BionIT, stated good to move to 2.15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v2.15.0
Projects
None yet
Development

No branches or pull requests

6 participants