Skip to content

Commit 58e0049

Browse files
authored
fix: addresses port mismatch for alloydb omni integration (#31)
1 parent 20055ad commit 58e0049

File tree

4 files changed

+7
-18
lines changed

4 files changed

+7
-18
lines changed

README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,13 @@
22

33
Reusable test fixtures for any and all databases.
44

5-
<!-- markdownlint-disable -->
6-
<p align="center">
7-
<!-- github-banner-start -->
8-
<img src="https://raw.githubusercontent.com/litestar-org/branding/main/assets/Branding%20-%20SVG%20-%20Transparent/Logo%20-%20Banner%20-%20Inline%20-%20Light.svg#gh-light-mode-only" alt="Litestar Logo - Light" width="100%" height="auto" />
9-
<img src="https://raw.githubusercontent.com/litestar-org/branding/main/assets/Branding%20-%20SVG%20-%20Transparent/Logo%20-%20Banner%20-%20Inline%20-%20Dark.svg#gh-dark-mode-only" alt="Litestar Logo - Dark" width="100%" height="auto" />
10-
<!-- github-banner-end -->
11-
</p>
12-
<!-- markdownlint-restore -->
135
<div align="center">
146

157
<!-- prettier-ignore-start -->
168

179
| Project | | Status |
1810
|-----------|:----|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
19-
| CI/CD | | [![Latest Release](https://github.com/litestar-org/pytest-databases/actions/workflows/publish.yml/badge.svg)](https://github.com/litestar-org/pytest-databases/actions/workflows/publish.yml) [![ci](https://github.com/litestar-org/pytest-databases/actions/workflows/ci.yml/badge.svg)](https://github.com/litestar-org/pytest-databases/actions/workflows/ci.yml) [![Documentation Building](https://github.com/litestar-org/pytest-databases/actions/workflows/docs.yml/badge.svg?branch=main)](https://github.com/litestar-org/pytest-databases/actions/workflows/docs.yml) |
11+
| CI/CD | | [![Latest Release](https://github.com/litestar-org/pytest-databases/actions/workflows/release.yml/badge.svg)](https://github.com/litestar-org/pytest-databases/actions/workflows/release.yml) [![ci](https://github.com/litestar-org/pytest-databases/actions/workflows/ci.yml/badge.svg)](https://github.com/litestar-org/pytest-databases/actions/workflows/ci.yml) [![Documentation Building](https://github.com/litestar-org/pytest-databases/actions/workflows/docs.yml/badge.svg?branch=main)](https://github.com/litestar-org/pytest-databases/actions/workflows/docs.yml) |
2012
| Quality | | [![Coverage](https://codecov.io/github/litestar-org/pytest-databases/graph/badge.svg?token=vKez4Pycrc)](https://codecov.io/github/litestar-org/pytest-databases) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=litestar-org_pytest_databases&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=litestar-org_pytest_databases) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=litestar-org_pytest_databases&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=litestar-org_pytest_databases) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=litestar-org_pytest_databases&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=litestar-org_pytest_databases) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=litestar-org_pytest_databases&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=litestar-org_pytest_databases) |
2113
| Package | | [![PyPI - Version](https://img.shields.io/pypi/v/pytest-databases?labelColor=202235&color=edb641&logo=python&logoColor=edb641)](https://badge.fury.io/py/pytest-databases) ![PyPI - Support Python Versions](https://img.shields.io/pypi/pyversions/pytest-databases?labelColor=202235&color=edb641&logo=python&logoColor=edb641) |
2214
| Community | | [![Reddit](https://img.shields.io/reddit/subreddit-subscribers/litestarapi?label=r%2FLitestar&logo=reddit&labelColor=202235&color=edb641&logoColor=edb641)](https://reddit.com/r/litestarapi) [![Discord](https://img.shields.io/discord/919193495116337154?labelColor=202235&color=edb641&label=chat%20on%20discord&logo=discord&logoColor=edb641)](https://discord.gg/litestar-919193495116337154) [![Matrix](https://img.shields.io/badge/chat%20on%20Matrix-bridged-202235?labelColor=202235&color=edb641&logo=matrix&logoColor=edb641)](https://matrix.to/#/#litestar:matrix.org) [![Medium](https://img.shields.io/badge/Medium-202235?labelColor=202235&color=edb641&logo=medium&logoColor=edb641)](https://blog.litestar.dev) [![Twitter](https://img.shields.io/twitter/follow/LitestarAPI?labelColor=202235&color=edb641&logo=twitter&logoColor=edb641&style=flat)](https://twitter.com/LitestarAPI) [![Blog](https://img.shields.io/badge/Blog-litestar.dev-202235?logo=blogger&labelColor=202235&color=edb641&logoColor=edb641)](https://blog.litestar.dev) |
@@ -25,10 +17,10 @@ Reusable test fixtures for any and all databases.
2517
<!-- prettier-ignore-end -->
2618
</div>
2719

28-
> [!WARNING] > **Pre-Release Alpha Stage**
20+
> [!WARNING]
2921
>
30-
> Please note that pytest-databases is currently in a pre-release alpha stage of development. This means the library is still under
31-
> active development, and its API is subject to change. We encourage developers to experiment with pytest-databases and provide
22+
> Please note that pytest-databases is currently in a pre-release stage of development. This means the library is still under
23+
> active development, and its initial API is subject to change. We encourage developers to experiment with pytest-databases and provide
3224
> feedback, but we recommend against using it in production environments until a stable release is available.`
3325
3426
## About

src/pytest_databases/docker/alloydb_omni.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,22 @@ async def alloydb_omni_service(
8989
docker_services: DockerServiceRegistry,
9090
default_alloydb_omni_service_name: str,
9191
docker_compose_files: list[Path],
92-
postgres_port: int,
92+
alloydb_omni_port: int,
9393
postgres_database: str,
9494
postgres_user: str,
9595
postgres_password: str,
9696
) -> None:
9797
os.environ["POSTGRES_PASSWORD"] = postgres_password
9898
os.environ["POSTGRES_USER"] = postgres_user
9999
os.environ["POSTGRES_DATABASE"] = postgres_database
100-
os.environ[f"{default_alloydb_omni_service_name.upper()}_PORT"] = str(postgres_port)
100+
os.environ[f"{default_alloydb_omni_service_name.upper()}_PORT"] = str(alloydb_omni_port)
101101
await docker_services.start(
102102
name=default_alloydb_omni_service_name,
103103
docker_compose_files=docker_compose_files,
104104
timeout=45,
105105
pause=1,
106106
check=alloydb_omni_responsive,
107-
port=postgres_port,
107+
port=alloydb_omni_port,
108108
database=postgres_database,
109109
user=postgres_user,
110110
password=postgres_password,

tests/docker/test_alloydb_omni.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ async def test_alloydb_omni_default_config(
5151
assert postgres_password == "super-secret"
5252

5353

54-
@pytest.mark.xfail
5554
async def test_alloydb_omni_services(
5655
docker_ip: str,
5756
alloydb_omni_service: DockerServiceRegistry,

tests/docker/test_keydb.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ def test_keydb_default_config(keydb_port: int) -> None:
4242
assert keydb_port == 6396
4343

4444

45-
# the container fails to start on my local VM hardware. For now, I'm marking this as acceptable failure. It passes in CI tests.
46-
@pytest.mark.xfail
4745
async def test_keydb_service(
4846
docker_ip: str,
4947
keydb_service: DockerServiceRegistry,

0 commit comments

Comments
 (0)