Skip to content

Commit

Permalink
Upgrade testcontainers
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenchrist committed May 30, 2024
1 parent f35f839 commit e596537
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ dev = [
"pymssql==2.3.0",
# testcontainers 4.x have issues with Kafka on arm
# https://github.com/testcontainers/testcontainers-python/issues/450
"testcontainers<4.0.0",
"testcontainers-minio",
"testcontainers-postgres",
"testcontainers-kafka",
"testcontainers[mssql]",
# "testcontainers<4.0.0",
# "testcontainers-minio",
# "testcontainers-postgres",
# "testcontainers-kafka",
# https://github.com/testcontainers/testcontainers-python/issues/554
# "testcontainers~=4.4.0",
# "testcontainers[minio]",
# "testcontainers[postgres]",
# "testcontainers[kafka]",
"testcontainers~=4.5.0",
"testcontainers[minio]",
"testcontainers[postgres]",
"testcontainers[kafka]",
"testcontainers[mssql]",
]

[project.urls]
Expand Down
4 changes: 0 additions & 4 deletions tests/test_test_kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ def remove_container():
request.addfinalizer(remove_container)


@pytest.mark.skipif(
sys.platform == "darwin",
reason="Fails on ARM mac, https://github.com/testcontainers/testcontainers-python/issues/450",
)
def test_test_kafka(kafka_container: KafkaContainer):
send_messages_to_topic("fixtures/kafka/data/messages.json", "inventory-events")
data_contract_str = _setup_datacontract()
Expand Down
10 changes: 5 additions & 5 deletions tests/test_test_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def remove_container():


def test_test_postgres(postgres_container, monkeypatch):
monkeypatch.setenv("DATACONTRACT_POSTGRES_USERNAME", postgres.POSTGRES_USER)
monkeypatch.setenv("DATACONTRACT_POSTGRES_PASSWORD", postgres.POSTGRES_PASSWORD)
monkeypatch.setenv("DATACONTRACT_POSTGRES_USERNAME", postgres.username)
monkeypatch.setenv("DATACONTRACT_POSTGRES_PASSWORD", postgres.password)
# monkeypatch.setenv("DATACONTRACT_POSTGRES_USERNAME", postgres.username)
# monkeypatch.setenv("DATACONTRACT_POSTGRES_PASSWORD", postgres.password)
_init_sql()
Expand All @@ -51,9 +51,9 @@ def _setup_datacontract():

def _init_sql():
connection = psycopg2.connect(
database=postgres.POSTGRES_DB,
user=postgres.POSTGRES_USER,
password=postgres.POSTGRES_PASSWORD,
database=postgres.dbname,
user=postgres.username,
password=postgres.password,
# database=postgres.dbname,
# user=postgres.username,
# password=postgres.password,
Expand Down

0 comments on commit e596537

Please sign in to comment.