- removed deprecated github actions
- moved to trunk
- connecting container to network now has a fallback if
Alias
field is empty toDNSNames
- dropped support for python 3.7
- built images can now be anonymous by specifying a
None
image_name
- created containers now use the image tag to create the container, if one is available
- changed base test dockerfiles to use alpine 3
- removed codecov integration
- this will be the last release to support python 3.7
- recorded WS and HTTP messages now also include the time they were received
- webservers will now wait a maximum of 5 seconds for the service thread to shut down.
- before they are used, local images are now checked against remote repositories to see if they are up to date.
- in python 3.12, confluent-kafka is used instead of kafka-python
- the type hint for
astart
has been changed toobject
to indicate that the response is not used.
- changed documentation theme to furo
- upgraded minimum frozenlist and aiohttp dependencies for python 3.12
- changed internal formatter to ruff
- fixed some tye hints that had implicit
Optional
types - added
overload
annotation forcontainers.upload_file
- added 3.12 to unittests
- using 'Trust server certificate' option in sqlcmd (for testing)
- odcb test image now uses the latest drivers
- the
file
parameter of build_image
- added
container_create_kwargs
to allSingleContainerService
extras. - build_image_async for asynchronous image building
RecordedHTTPRequest.text
to get the request body as textRecordedHTTPRequest.json
to get the request body as jsonExpectedHTTPRequest.json_submap
to expect a submap of the request body as json
- fixed import of exceptions in aerospike that would cause an error with newer clients
- fixed
forbid_implicit_head_verb
being incorrectly named in theclass_http_endpoint
overload.
- fixed documentation of MockWSEndpoint.side_effect
RunMixin
andAsyncRunMixin
no longer subclassContainerService
DockerfileParseException
should be renamed toDockerfileParseError
DockerfileParseException
has been renamed toDockerfileParseError
(legacy alias preserved)RunMixin
andAsyncRunMixin
are now subclasses ofContainerService
- vault: default tag changed to hashicorp/vault:latest
- fixed issue where latest bitnami kafka would not start
- extras/kafka: added
bitnami_debug
parameter to enable bitnami debug. - the "pending_exception" method and "raise_from_pending" method of webservice are now public, but undocumented. Their API is likely to change.
AsyncRunMixin
noe exit asynchronously
- docker_expose_host is no longer inferred for WSL2
- support for gcloud-aio-storage 8.0.0
- support for sqlalchemy2
- documentation to the aerospike service
- revamped aerospike service
- added the
Aerospike
extra, to set up an aerospike enterprise container.
- Fixed issue in webserver where if a client connection would disconnect abrubtly, the entire server would stop working. This is probably not the expected behaviour of the mocked service so it has been changed to ignore these events.
AzuriteService
addedhost_connection_string
andhost_endpoint_url
propertiesallow_abrubt_disconnect
for websocket webserver endpoints.
- image names in docker-build can now be manually tagged
- the default fake-gcs-server has been locked to 1.42, since the altest has a bug.
- all connections to localhost are now patched appropriately for WSL2 (experimental)
- simplified the azure-storage dependency
None
is no longer an acceptable port for webserver- Changed webserver's default port from
None
to0
.
- fixed issue when starting up webserver with the uvicorn debugger enabled
- support for python 3.11
- added the
fake_gcs
extra, to set up a fake google cloud storage container.
- removed deprecated function from hvac tests
- all dependencies have been unlocked for major changes (
^X
=>>=X
)
- the type hints for
class_http_endpoint
andclass_ws_endpoint
have been changed to allow any side effect (including methods).
- When an
MockHTTPEndpoint
/MockWSEndpoint
raises an exception, the traceback is printed.
removing
context wrapper, that ensures containers will be removed after exiting.MSSQLService
, a new service that can be used to create a new MSSQL database.database
mixing method, use to create and manage database within an sql service. In use both inMSSQLService
andPostgreSQLService
.PostgreSQLService
's*_connection_string
methods now also accept anoptions
argument.PostgreSQLService
's constructor now accept thelocal_driver
andlocal_options
arguments.
PostgreSQLService
'sengine
andconnection
methods are now deprecated, create an sqlalchemy engine and connection manually instead.
- rabbitmq service startup can now handle
AMQPConnectorException
. azure-blob-storage
of versions12.11.0
and up can now be installed.- header type hinting for expected webservice requests
- headers in recorded webservice requests are now always lowercase
- redis' default retry attempts changed from 10 to 15.
- tests have been streamlined to be faster and more stable
- If a helper container fails during tests, it will not be removed
- pytest integration, with the
docker_client
fixture AsyncRunMixin
class, to allow starting up services asynchronously- Note: Currently, only waiting for services to start is asynchronous.
webserver.verbose_http_side_effect
to print all http traffic through an endpoint.- Webserver: all endpoint factory functions now also accept a
name
parameter, to manually set the name of an endpoint. RetrySpec.aretry
to retry a function but to wait asynchronously between attempts.
docker_client
function renamed toopen_docker_client
(legacy alias kept for backwards compatibility)extras.BlobStorageService
renamed toextras.AzuriteService
(legacy alias kept for backwards compatibility)- Webserver no longer uses uvicorn's logging. This can be reverted by manually setting the
log_config
inWebServer
's constructor. To note endpoint access, usewebserver.verbose_http_side_effect
.
yellowbox.docker_client
should be replaced withyellowbox.open_docker_client
yellowbox.extras.BlobStorageService
should be replaced withyellowbox.extras.AzuriteService
- the method
RecordedHTTPRequests.has_requests_any_order
has been removed.
- webserver: fixed websocket endpoint not working for starlette 0.18
- igraph is no longer a requirement for webserver
- the "_all" extra has been renamed to "dev"
- Added minimum versions for uvicorn and starlette
- webserver: forbid_head_verb fixed to forbid_implicit_head_verb in the type annotation.
- fixed the dependency for igraph
- Fixed issue where webserver would refuse connections from containers on some platforms
- Webserver logs now show the client address
- MockHttpEndpoint and MockWSEndpoint added to webserver package
- Webserver:
class_http_endpoint
andclass_ws_endpoint
, WebServer subclasses automatically add all class_*_endpoints to their instances when started - Webserver:
iter_side_effects
to create a side effect that delegates to other per request.
- Webserver:
PORT_ACCESS_MAX_RETRIES
renamed to_PORT_ACCESS_MAX_RETRIES
- removed the flask dependency
HttpService
is now deprecated in favor ofWebService
WebsocketService
is now deprecated in favor ofWebService
WebService
, a new service to mock http and websocket server- PostgreSQLService: added method host_connection_string to connect to the database from another container.
- Added tests for python 3.10
extras.vault.VaultService
, A new service for Hashicorp Vault.
websocket-client
has been downgraded to a dev dependency
- build_image ContextManager, to create an image from dockerfile
- docker_client can be imported directly from yellowbox package
- Changed rabbitmq configuration to use config files instead of env vars. Allowing usage of rabbitmq 3.9.0 and upwards.
- A bug in newer docker desktop versions that prevented RabbitMQ from starting up. Fixed.
- improved WSL detection to detect WSL2 releases
- Cached engine was deleted for postgresql engine
- the "all" extra was renamed to "_all" to discourage non-development usages
- Changed linters to mypy and isort
- HttpServer: the request handler can now be returned by callbacks to handle the request manually
- Option in RunMixin.run to accept network parameter
- Utility function to access docker client from WSL (docker_client in yellowbox.docker_utils)
- docker_host_name was broken within WSL
- Services can now be disconnected after they are stopped
- New WebSocketService to emulate Websocket servers.
- HttpServer: added
path_params
method to parse path parameters of a request.
TypeError
when accessing body of a request without a body. (nowhandler.body()
of a request returnsNone
)- Excluded usage of any azure-storage-blob version above 12.7.0 as a tempfix.
- changed
local_url
to use 127.0.0.1, to earn a speedup in some cases.
- Excluded usage of a broken version of azure-storage-blob package: 12.7.0
clean_slate
methods are now gone, replaced withreset_state
.
- now retry is only a a parameter for select services, including all container services.
- New PostgreSQL service.
clear_state
to reset the data on select services.
- new properties in
BlobStorageService
:endpoint_url
,container_endpoint_url
,account_credentials
.
RabbitMQService
suppressConnectionError
s on startup retries.
LogstashService
correctly reconstructs fragmented data.
- Revamped LogstashService. It now fakes the Logstash json_lines protocol.
- YellowService no longer has
connect
&disconnect
. They are now delegated toContainerService
.
- logstash is now fixed
- all
retry_specs
parameters have been replaced withretry_spec
- all extra-containers with retrying startup mechanisms now support retry arguments in run
- a new extra: HTTPService, to easily create and mock http services
- redis's minimum version was changed to 3.3.0
- create_and_pull will throw an error if no tag is specified
- Since logstash has no "latest" image tag, the default image name has been removed.
- Project now uses poetry instead of setup.py
YellowKafka
has been renamed toKafkaService
YellowLogstash
has been renamed toLogstashService
- extra dependencies are now starred to increase compatibility.
- Major overhaul to class hierarchy. All "extras" services can now only be initialized using docker client.
KafkaService
Now accepts teo ports to bind to, one for external communication via docker host, and another for internal communication via networks.
- Short examples in the readme
- This changelog
- automatic testing in github repository
- the default package can now be used to import some common names.
KafkaService
can now accept the names of the zookeeper and broker imagesconnect
now accepts keyword arguments, forwarded to the inner connect call.RabbitMQService
tests now include vhost cases.- Utility functions
download_file
andupload_file
RabbitMQService
now has multiple management-related methods (useful for debugging)BlobStorageService
: a new extra service that holds azurite blob storage.- The
clean_slate
context forRedisService
andRabbitService
that ensures the service is in an empty state before and after the context. RedisService
's newset_state
method to easily set the state of the internal redis DB.- automatic linting on every PR
- all extra client methods also accept
**kwargs
forwarded to client constructor BlobStorageService.connection_string
for obtaining the connection string to the container's blob storage.BlobStorageService.container_connection_string
for obtaining the connection string to be used inside a docker network.containers.short_id(container)
retrieves the short id of a container.
- Bug where tests failed on linux because linux doesn't have
host.docker.internal
. Linux now uses IP172.17.0.1
to target host. - Bug where services would fail if trying to run a non-pulled image.
- Issue where the rabbit service test was not tries on the main tag.
- restored some network tests
- Bug in
connect
where networks would try to disconnect containers that have since been removed. - Bug in
KafkaService
where the service would try to kill if the containers even if they are no longer running. - Bug in
KafkaService
where the network would not disconnect from the server after. - Bug in
RabbitMQService
where the container would no kill cleanly - When removing a container, the volumes are now removed as well.
initial release