Skip to content

Commit

Permalink
[Cluster tools] Set OpenSearch version for test containers (#1152)
Browse files Browse the repository at this point in the history
Signed-off-by: Tanner Lewis <[email protected]>
  • Loading branch information
lewijacn authored Nov 20, 2024
1 parent 176eefd commit 55a391f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,21 @@ Generate a coverage report to see how much of the code is tested.
pipenv run coverage report
```

** Generated HTML**
**Generated HTML**

```bash
pipenv run coverage html
```

### Troubleshooting

#### Docker connection issue
```
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
```

1. Confirm that Docker is running with a command such as `docker ps`
2. If `DOCKER_HOST` environment variable is not set, attempt to set this to the local socket, e.g. on Mac
```
export DOCKER_HOST=unix:///Users/<USER_NAME>/.docker/run/docker.sock
```
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
@pytest.fixture(scope="function")
def env():
# Spin up the OpenSearch container and wait until it's healthy
container = OpenSearchContainer()
container = OpenSearchContainer("opensearchproject/opensearch:2.14.0")
container.with_env("OPENSEARCH_INITIAL_ADMIN_PASSWORD", "myStrongPassword123!")
container.start()
wait_for_logs(container, ".*recovered .* indices into cluster_state.*")

Expand Down

0 comments on commit 55a391f

Please sign in to comment.