Skip to content

Commit fa13ab3

Browse files
committed
Update the README.md file for the tests
Added some more steps to configure the environment to make tests work on local machine.
1 parent adbd066 commit fa13ab3

File tree

1 file changed

+37
-3
lines changed

1 file changed

+37
-3
lines changed

README.md

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,51 @@ Note: To ensure the GitHub Action runs successfully, users must add a `GH_ACCESS
5959

6060
### Deploy & Test
6161

62-
#### Running Python selftests in Pytest
62+
#### Prepare Python + poetry + pytest env
6363

6464
```shell
65-
pip install poetry
66-
poetry env use /usr/bin/python3.12
65+
# Linux
66+
sudo dnf install python3.12
67+
pip install --user poetry
68+
# MacOS
69+
brew install [email protected] poetry
70+
71+
poetry env use $(which python3.12)
6772
poetry config virtualenvs.in-project true
73+
poetry env info
6874
poetry install --sync
75+
```
6976

77+
#### Running Python selftests in Pytest
78+
By completing configuration in previous section, you are able to run any tests that don't need to start a container using following command:
79+
80+
```
7081
poetry run pytest
7182
```
7283

84+
#### Running testcontainers tests in Pytest
85+
```
86+
# Podman/Docker config
87+
# Linux
88+
sudo dnf install podman
89+
systemctl --user start podman.service
90+
systemctl --user status podman.service
91+
systemctl --user status podman.socket
92+
DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock poetry run pytest tests/containers --image quay.io/opendatahub/workbench-images@sha256:e98d19df346e7abb1fa3053f6d41f0d1fa9bab39e49b4cb90b510ca33452c2e4
93+
94+
# Mac OS
95+
brew install podman
96+
podman machine init
97+
podman machine set --rootful
98+
sudo podman-mac-helper install
99+
podman machine start
100+
poetry run pytest tests/containers --image quay.io/opendatahub/workbench-images@sha256:e98d19df346e7abb1fa3053f6d41f0d1fa9bab39e49b4cb90b510ca33452c2e4
101+
```
102+
103+
#### Running Playwright tests in Pytest
104+
105+
[tests/browser/README.md](tests/browser/README.md)
106+
73107
#### Notebooks
74108

75109
Deploy the notebook images in your Kubernetes environment using:

0 commit comments

Comments
 (0)