-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: rename classes as to not have the Mongo emulator mistaken for t…
…he MongoDB testcontainer
- Loading branch information
Showing
8 changed files
with
52 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.. autoclass:: testcontainers.cosmosdb.MongoDBEmulatorContainer | ||
.. autoclass:: testcontainers.cosmosdb.NoSQLEmulatorContainer | ||
.. title:: testcontainers.cosmosdb.CosmosDBEmulatorContainer | ||
.. autoclass:: testcontainers.cosmosdb.CosmosDBMongoEndpointContainer | ||
.. title:: testcontainers.cosmosdb.CosmosDBMongoEndpointContainer | ||
|
||
.. autoclass:: testcontainers.cosmosdb.CosmosDBNoSQLEndpointContainer | ||
.. title:: testcontainers.cosmosdb.CosmosDBNoSQLEndpointContainer |
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,4 +1,4 @@ | ||
from .mongodb import MongoDBEmulatorContainer | ||
from .nosql import NoSQLEmulatorContainer | ||
from .mongodb import CosmosDBMongoEndpointContainer | ||
from .nosql import CosmosDBNoSQLEndpointContainer | ||
|
||
__all__ = ["MongoDBEmulatorContainer", "NoSQLEmulatorContainer"] | ||
__all__ = ["CosmosDBMongoEndpointContainer", "CosmosDBNoSQLEndpointContainer"] |
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
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,14 +1,14 @@ | ||
import pytest | ||
from testcontainers.cosmosdb import MongoDBEmulatorContainer | ||
from testcontainers.cosmosdb import CosmosDBMongoEndpointContainer | ||
|
||
def test_requires_a_version(): | ||
with pytest.raises(AssertionError, match="A MongoDB version is required"): | ||
MongoDBEmulatorContainer() | ||
CosmosDBMongoEndpointContainer() | ||
|
||
# instanciates | ||
MongoDBEmulatorContainer(mongodb_version="4.0") | ||
CosmosDBMongoEndpointContainer(mongodb_version="4.0") | ||
|
||
def test_runs(): | ||
with MongoDBEmulatorContainer(mongodb_version="4.0", partition_count=1, bind_ports=False) as emulator: | ||
with CosmosDBMongoEndpointContainer(mongodb_version="4.0", partition_count=1, bind_ports=False) as emulator: | ||
assert emulator.env["AZURE_COSMOS_EMULATOR_ENABLE_MONGODB_ENDPOINT"] == "4.0" | ||
assert emulator.get_exposed_port(10255) is not None, "The MongoDB endpoint's port should be exposed" |
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,6 +1,6 @@ | ||
import pytest | ||
from testcontainers.cosmosdb import NoSQLEmulatorContainer | ||
from testcontainers.cosmosdb import CosmosDBNoSQLEndpointContainer | ||
|
||
def test_runs(): | ||
with NoSQLEmulatorContainer(partition_count=1, bind_ports=False) as emulator: | ||
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" |