forked from testcontainers/testcontainers-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mehdi BEN ABDALLAH
committed
May 28, 2024
1 parent
57496c8
commit a72564a
Showing
6 changed files
with
47 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
import pytest | ||
from testcontainers.cosmosdb._emulator import CosmosDBEmulatorContainer | ||
from testcontainers.core.config import testcontainers_config | ||
|
||
|
||
@pytest.fixture(scope="session", autouse=True) | ||
def config_testcontatiners(): | ||
testcontainers_config.max_tries = 300 | ||
|
||
|
||
def test_runs(): | ||
with CosmosDBEmulatorContainer(partition_count=1, bind_ports=False) as emulator: | ||
with CosmosDBEmulatorContainer(partition_count=1) as emulator: | ||
assert emulator.server_certificate_pem is not None | ||
assert emulator.get_exposed_port(8081) is not None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
import pytest | ||
from testcontainers.cosmosdb import CosmosDBNoSQLEndpointContainer | ||
from testcontainers.core.config import testcontainers_config | ||
|
||
|
||
@pytest.fixture(scope="session", autouse=True) | ||
def config_testcontatiners(): | ||
testcontainers_config.max_tries = 300 | ||
|
||
|
||
def test_runs(): | ||
with CosmosDBNoSQLEndpointContainer(partition_count=1, bind_ports=False) as emulator: | ||
assert emulator.get_exposed_port(8081) is not None, "The NoSQL endpoint's port should be exposed" | ||
with CosmosDBNoSQLEndpointContainer(partition_count=1) as emulator: | ||
assert emulator.port is not None, "The NoSQL endpoint's port should be exposed" |