{ "info": { "author": "Marco Masetti", "author_email": "marco.masetti@sky.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "chaostoolkit-wiremock\n=====================\n\n[![Build Status](https://travis-ci.com/chaostoolkit-incubator/chaostoolkit-wiremock.svg?branch=master)](https://travis-ci.com/chaostoolkit-incubator/chaostoolkit-wiremock)\n[![image](https://img.shields.io/pypi/v/chaoswm.svg)](https://pypi.python.org/pypi/chaoswm)\n\n[Chaos Toolkit][chaostoolkit] driver for [WireMock][wiremock]. \n\n[chaostoolkit]: http://chaostoolkit.org\n[wiremock]: http://wiremock.org/\n\nPackage installation\n--------------------\n\nTo install the package from pypi.org:\n\n pip install -U chaostoolkit-wiremock\n\nInstallation from source\n------------------------\n\nIn order to use it, you need python 3.5+ in your environment.\nOnce downloaded the project, cd into it and run:\n\n pip install -r requirements.txt -r requirements-dev.txt\n make clean && make test && make install\n\nConfiguration\n-------------\n\nThe following keys can be configured in the experiment global\nconfiguration section, under the \\\"wiremock\\\" key:\n\n- **host**: the wiremock server host\n- **port**: the wiremock server port\n- **contextPath**: the contextPath for your wiremock server (optional)\n- **timeout**: accepted timeout (defaults to 1 sec)\n- **down**: the delayDistribution section used by the `down` action\n\nConfiguration example:\n\n {\n \"configuration\": {\n \"wiremock\": {\n \"host\": \"localhost\",\n \"port\": 8080,\n \"contextPath\": \"/wiremock\",\n \"timeout\": 10,\n \"down\": {\n \"type\": \"lognormal\",\n \"median\": 3000,\n \"sigma\": 0.2\n }\n }\n }\n }\n\nExported Actions\n----------------\n\nAdding a list of mappings:\n\n {\n \"method\": [\n {\n \"type\": \"action\",\n \"name\": \"adding a mapping\",\n \"provider\": {\n \"type\": \"python\",\n \"module\": \"chaoswm.actions\",\n \"func\": \"add_mappings\",\n \"arguments\": {\n \"mappings\": [{\n \"request\": {\n \"method\": \"GET\",\n \"url\": \"/hello\"\n },\n \"response\": {\n \"status\": 200,\n \"body\": \"Hello world!\",\n \"headers\": {\n \"Content-Type\": \"text/plain\"\n }\n } \n }]\n }\n }\n }\n ]\n }\n\nDeleting a list of mappings:\n\n {\n \"method\": [\n {\n \"type\": \"action\",\n \"name\": \"deleting a mapping\",\n \"provider\": {\n \"type\": \"python\",\n \"module\": \"chaoswm.actions\",\n \"func\": \"delete_mappings\",\n \"arguments\": {\n \"filter\": [{\n \"method\": \"GET\",\n \"url\": \"/hello\"\n }]\n }\n }\n }\n ]\n }\n\nAdding a global fixed delay:\n\n {\n \"method\": [\n {\n \"type\": \"action\",\n \"name\": \"Adding a global fixed delay\",\n \"provider\": {\n \"type\": \"python\",\n \"module\": \"chaoswm.actions\",\n \"func\": \"global_fixed_delay\",\n \"arguments\": {\n \"fixedDelay\": 10\n }\n }\n }\n ]\n }\n\nAdding a global random delay:\n\n {\n \"method\": [\n {\n \"type\": \"action\",\n \"name\": \"Adding a global random delay\",\n \"provider\": {\n \"type\": \"python\",\n \"module\": \"chaoswm.actions\",\n \"func\": \"global_random_delay\",\n \"arguments\": {\n \"delayDistribution\": {\n \"type\": \"lognormal\",\n \"median\": 20,\n \"sigma\": 0.1\n }\n }\n }\n }\n ]\n }\n\nAdding a fixed delay to a list of mappings:\n\n {\n \"method\": [\n {\n \"type\": \"action\",\n \"name\": \"Adding a fixed delay to a mapping\",\n \"provider\": {\n \"type\": \"python\",\n \"module\": \"chaoswm.actions\",\n \"func\": \"fixed_delay\",\n \"arguments\": {\n \"filter\": [{\n \"method\": \"GET\",\n \"url\": \"/hello1\"\n }],\n \"fixedDelayMilliseconds\": 1000\n }\n }\n }\n ]\n }\n\nAdding a random delay to a list of mappings:\n\n {\n \"method\": [\n {\n \"type\": \"action\",\n \"name\": \"Adding a random delay to a mapping\",\n \"provider\": {\n \"type\": \"python\",\n \"module\": \"chaoswm.actions\",\n \"func\": \"random_delay\",\n \"arguments\": {\n \"filter\": [{\n \"method\": \"GET\",\n \"url\": \"/hello2\"\n }],\n \"delayDistribution\": {\n \"type\": \"lognormal\",\n \"median\": 2000,\n \"sigma\": 0.5\n }\n }\n }\n }\n ]\n }\n\nAdding a ChunkedDribbleDelay to a list of mappings:\n\n {\n \"method\": [\n {\n \"type\": \"action\",\n \"name\": \"Adding a ChunkedDribbleDelay to a mapping\",\n \"provider\": {\n \"type\": \"python\",\n \"module\": \"chaoswm.actions\",\n \"func\": \"chunked_dribble_delay\",\n \"arguments\": {\n \"filter\": [{\n \"method\": \"GET\",\n \"url\": \"/hello\"\n }],\n \"chunkedDribbleDelay\": {\n \"numberOfChunks\": 5,\n \"totalDuration\": 1000\n }\n }\n }\n }\n ]\n }\n\nTaking a list of mappings down (heavy distribution delay). This action\nwill use the parameters specified in the \\\"down\\\" key of the\nconfiguration section:\n\n {\n \"method\": [\n {\n \"type\": \"action\",\n \"name\": \"Taking a mapping down\",\n \"provider\": {\n \"type\": \"python\",\n \"module\": \"chaoswm.actions\",\n \"func\": \"down\",\n \"arguments\": {\n \"filter\": [{\n \"method\": \"GET\",\n \"url\": \"/hello\"\n }]\n }\n }\n }\n ]\n }\n\nTaking a list of mappings up back again:\n\n {\n \"method\": [\n {\n \"type\": \"action\",\n \"name\": \"Taking a mapping down\",\n \"provider\": {\n \"type\": \"python\",\n \"module\": \"chaoswm.actions\",\n \"func\": \"up\",\n \"arguments\": {\n \"filter\": [{\n \"method\": \"GET\",\n \"url\": \"/hello\"\n }]\n }\n }\n }\n ]\n }\n\nResetting the wiremock server (deleting all mappings):\n\n {\n \"method\": [\n {\n \"type\": \"action\",\n \"name\": \"Taking a mapping down\",\n \"provider\": {\n \"type\": \"python\",\n \"module\": \"chaoswm.actions\",\n \"func\": \"reset\"\n }\n }\n ]\n }\n\n\n### Experiments\n\nThe driver comes with an experiments directory where you can find snippets to test all APIs \nagainst a WireMock server listening on localhost:8080.\n\n\n### Discovery\n\nYou may use the Chaos Toolkit to discover the capabilities of this\nextension:\n\n $ chaos discover chaostoolkit-wiremock --no-install\n\nCredits\n-------\n\nThis package was created with\n[Cookiecutter](https://github.com/audreyr/cookiecutter) and the\n[audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage)\nproject template.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sky-uk/chaostoolkit-wiremock", "keywords": "chaoswm", "license": "Apache License, v2.0", "maintainer": "", "maintainer_email": "", "name": "chaostoolkit-wiremock", "package_url": "https://pypi.org/project/chaostoolkit-wiremock/", "platform": "", "project_url": "https://pypi.org/project/chaostoolkit-wiremock/", "project_urls": { "Homepage": "https://github.com/sky-uk/chaostoolkit-wiremock" }, "release_url": "https://pypi.org/project/chaostoolkit-wiremock/0.1.1/", "requires_dist": [ "chaostoolkit-lib (>=1.5.0)", "typing", "logzero", "requests" ], "requires_python": "", "summary": "chaostoolkit driver for wiremock", "version": "0.1.1" }, "last_serial": 5730718, "releases": { "0.0.3": [ { "comment_text": "", "digests": { "md5": "7aaae7d297465e2cee5a91e148925678", "sha256": "23cc2cbbcb54b020eae53990f5cde6d293a78f3c8541f107cee32578931ce36b" }, "downloads": -1, "filename": "chaostoolkit_wiremock-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7aaae7d297465e2cee5a91e148925678", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12403, "upload_time": "2019-08-20T11:47:35", "url": "https://files.pythonhosted.org/packages/3e/98/8a27cbe093f88bfcd08b399c4087537cec1904feb8f27f702d3bceb7db14/chaostoolkit_wiremock-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8c7a20bfaa5741fdb2025cdc0ff03806", "sha256": "cd15eac9416b1e82fe2d08fe4e53494083fd1bbc876fc99774f178720c0f0120" }, "downloads": -1, "filename": "chaostoolkit-wiremock-0.0.3.tar.gz", "has_sig": false, "md5_digest": "8c7a20bfaa5741fdb2025cdc0ff03806", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16300, "upload_time": "2019-08-20T11:47:37", "url": "https://files.pythonhosted.org/packages/d3/47/9a29752c8402c54e569c3894710a319802bb271011f4f4d9ca4e78a23f72/chaostoolkit-wiremock-0.0.3.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "7317e21b51def242cd547c91032264e7", "sha256": "8d120392ce7db9f08ec1954ddc4b38f4e9d4728a9c56c99b3e8e0efc74c5de52" }, "downloads": -1, "filename": "chaostoolkit_wiremock-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7317e21b51def242cd547c91032264e7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12548, "upload_time": "2019-08-26T12:58:35", "url": "https://files.pythonhosted.org/packages/eb/a8/d7538bbf244562b4447f860ad0d602ae66410575e14521144ccfeb39218e/chaostoolkit_wiremock-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "341c5418da4f5da480754671508ceb95", "sha256": "0cf875a90ccaee7d6690b0d4931172df75da89d12062a928be71a0be88a3d56d" }, "downloads": -1, "filename": "chaostoolkit-wiremock-0.1.1.tar.gz", "has_sig": false, "md5_digest": "341c5418da4f5da480754671508ceb95", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16399, "upload_time": "2019-08-26T12:58:36", "url": "https://files.pythonhosted.org/packages/fc/ee/9feaa53f2d27a33cd5ad5c68bd7409528c55dfc71be17212fdaee9fab171/chaostoolkit-wiremock-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7317e21b51def242cd547c91032264e7", "sha256": "8d120392ce7db9f08ec1954ddc4b38f4e9d4728a9c56c99b3e8e0efc74c5de52" }, "downloads": -1, "filename": "chaostoolkit_wiremock-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7317e21b51def242cd547c91032264e7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12548, "upload_time": "2019-08-26T12:58:35", "url": "https://files.pythonhosted.org/packages/eb/a8/d7538bbf244562b4447f860ad0d602ae66410575e14521144ccfeb39218e/chaostoolkit_wiremock-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "341c5418da4f5da480754671508ceb95", "sha256": "0cf875a90ccaee7d6690b0d4931172df75da89d12062a928be71a0be88a3d56d" }, "downloads": -1, "filename": "chaostoolkit-wiremock-0.1.1.tar.gz", "has_sig": false, "md5_digest": "341c5418da4f5da480754671508ceb95", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16399, "upload_time": "2019-08-26T12:58:36", "url": "https://files.pythonhosted.org/packages/fc/ee/9feaa53f2d27a33cd5ad5c68bd7409528c55dfc71be17212fdaee9fab171/chaostoolkit-wiremock-0.1.1.tar.gz" } ] }