Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions testcontainers/arangodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class ArangoDbContainer(DbContainer):
# Create a new database named "test".
sys_db.create_database("test")
"""

def __init__(self,
image: str = "arangodb:latest",
port_to_expose: int = 8529,
Expand Down
1 change: 1 addition & 0 deletions testcontainers/compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class DockerCompose(object):
expose:
- "5555"
"""

def __init__(
self,
filepath,
Expand Down
1 change: 1 addition & 0 deletions testcontainers/elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class ElasticSearchContainer(DockerContainer):
with ElasticSearchContainer() as es:
connection_url = es.get_url()
"""

def __init__(self, image="elasticsearch", port_to_expose=9200, **kwargs):
super(ElasticSearchContainer, self).__init__(image, **kwargs)
self.port_to_expose = port_to_expose
Expand Down
1 change: 1 addition & 0 deletions testcontainers/google/pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def test_docker_run_pubsub():
topic_path = publisher.topic_path(pubsub.project, "my-topic")
topic = publisher.create_topic(topic_path)
"""

def __init__(self, image="google/cloud-sdk:latest",
project="test-project", port=8432, **kwargs):
super(PubSubContainer, self).__init__(image=image, **kwargs)
Expand Down
12 changes: 6 additions & 6 deletions testcontainers/keycloak.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ def start(self):

def get_client(self, **kwargs):
default_kwargs = dict(
server_url="{}/auth/".format(self.get_url()),
username=self.KEYCLOAK_USER,
password=self.KEYCLOAK_PASSWORD,
realm_name="master",
verify=True,
)
server_url="{}/auth/".format(self.get_url()),
username=self.KEYCLOAK_USER,
password=self.KEYCLOAK_PASSWORD,
realm_name="master",
verify=True,
)
kwargs = {
**default_kwargs,
**kwargs
Expand Down
1 change: 1 addition & 0 deletions testcontainers/mssql.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class SqlServerContainer(DbContainer):
Requires `ODBC Driver 17 for SQL Server <https://docs.microsoft.com/en-us/sql/connect/odbc/
linux-mac/installing-the-microsoft-odbc-driver-for-sql-server>`_.
"""

def __init__(self, image="mcr.microsoft.com/mssql/server:2019-latest", user="SA", password=None,
port=1433, dbname="tempdb", dialect='mssql+pymssql', **kwargs):
super(SqlServerContainer, self).__init__(image, **kwargs)
Expand Down
1 change: 1 addition & 0 deletions testcontainers/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class MySqlContainer(DbContainer):
result = e.execute("select version()")
version, = result.fetchone()
"""

def __init__(self, image="mysql:latest", **kwargs):
super(MySqlContainer, self).__init__(image)
self.port_to_expose = 3306
Expand Down
1 change: 1 addition & 0 deletions testcontainers/oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class OracleDbContainer(DbContainer):
e = sqlalchemy.create_engine(oracle.get_connection_url())
result = e.execute("select 1 from dual")
"""

def __init__(self, image="wnameless/oracle-xe-11g-r2:latest", **kwargs):
super(OracleDbContainer, self).__init__(image=image, **kwargs)
self.container_port = 1521
Expand Down
1 change: 1 addition & 0 deletions testcontainers/selenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class BrowserWebDriverContainer(DockerContainer):

You can easily change browser by passing :code:`DesiredCapabilities.FIREFOX` instead.
"""

def __init__(self, capabilities, image=None, **kwargs):
self.capabilities = capabilities
self.image = image or get_image_name(capabilities)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_nginx.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ def test_docker_run_nginx():
url = "http://{}:{}/".format(nginx.get_container_host_ip(),
nginx.get_exposed_port(port))
r = requests.get(url)
assert(r.status_code == 200)
assert('Welcome to nginx!' in r.text)
assert (r.status_code == 200)
assert ('Welcome to nginx!' in r.text)