https://github.com/buttahtoast/docker-tavern
Tavern Docker Image
https://github.com/buttahtoast/docker-tavern
container docker docker-tavern tavern
Last synced: 3 months ago
JSON representation
Tavern Docker Image
- Host: GitHub
- URL: https://github.com/buttahtoast/docker-tavern
- Owner: buttahtoast
- License: apache-2.0
- Created: 2020-11-24T09:57:44.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-14T23:06:31.000Z (over 4 years ago)
- Last Synced: 2025-01-25T08:13:13.125Z (5 months ago)
- Topics: container, docker, docker-tavern, tavern
- Language: Dockerfile
- Size: 56.6 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker Tavern
[](https://opensource.org/licenses/Apache-2.0)
[](https://drone.buttahtoast.ch/buttahtoast/docker-tavern)Tavern is an advanced pytest based API testing framework for HTTP, MQTT or other protocols. This Repository implements a Docker Image containg tavern.
Vist Tavern's website to learn more:
* [https://tavern.readthedocs.io/en/latest/](https://tavern.readthedocs.io/en/latest/)
## Running tavern
Simply map your tavern suites into the tavern container:
```
$ docker run -v ./tavern-tests:/tavern -it buttahtoast/docker-tavern:latest
```Supported Tags: https://hub.docker.com/repository/docker/buttahtoast/docker-tavern/tags
### Configuration
The configuration for this tavern Docker image is made via Environment variables and is kept as simple as possible.
|**Environment Variable**|**Description**|**Default**|
|:-----------------------|:--------------|:----------|
| `TEST_DIRECTORY` | Directory which holds all the tavern test suites. which should executed. Make sure the tavern user has access to the directory and all it's files. | `/tavern/` |
| `DEBUG` | Enables logging on DEBUG level | `false` |
| `LOG_TO_FILE` | Log to a specific file instead of logging to stdout. Value holds the file which will be logged to. | - |### Permissions
When you are getting the following errors, you might have a problem with the permissions on your mounted directories.
```
../home/tavern/.local/lib/python3.9/site-packages/_pytest/stepwise.py:122
/home/tavern/.local/lib/python3.9/site-packages/_pytest/stepwise.py:122: PytestCacheWarning: cache could not write path /tavern/.pytest_cache/v/cache/stepwise
self.config.cache.set("cache/stepwise", [])../home/tavern/.local/lib/python3.9/site-packages/_pytest/cacheprovider.py:403
/home/tavern/.local/lib/python3.9/site-packages/_pytest/cacheprovider.py:403: PytestCacheWarning: cache could not write path /tavern/.pytest_cache/v/cache/nodeids
config.cache.set("cache/nodeids", sorted(self.cached_nodeids))../home/tavern/.local/lib/python3.9/site-packages/_pytest/cacheprovider.py:357
/home/tavern/.local/lib/python3.9/site-packages/_pytest/cacheprovider.py:357: PytestCacheWarning: cache could not write path /tavern/.pytest_cache/v/cache/lastfailed
config.cache.set("cache/lastfailed", self.lastfailed)
```Make Sure to User ID owns both mounted directories:
```
sudo chown -R 1500:1500 ~/scripts
sudo chown -R 1500:1500 ~/tests
```And then try to rerun it:
```
sudo docker run -v ~/scripts/:/scripts -v ~/tests/:/tavern tavern:latest
```## Contributing
We'd love to have you contribute! Please refer to our [contribution guidelines](CONTRIBUTING.md) for details.
**By making a contribution to this project, you agree to and comply with the
[Developer's Certificate of Origin](https://developercertificate.org/).**