Skip to content

Commit

Permalink
improve documentation (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
jupe authored Jul 3, 2020
1 parent 80afa31 commit 748a367
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pytest plugin for lockable resources.
Replacement for Jenkins lockable -plugin.
Locking is implemented using `<resource.id>.lock` files.

Resources are described in json file as array of objects. Each object has some mandatory fields but can contains any other as well. Required fields are: `id`, `online`, `hostname`-
Resources are described in json file as array of objects. Each object has some mandatory fields but can contains any other as well. Required fields are: `id`, `online`, `hostname`.

## Example `resources.json`

Expand All @@ -18,13 +18,20 @@ Resources are described in json file as array of objects. Each object has some m
{
"id": "1234",
"online": true,
"hostname": "localhost"
"hostname": "localhost",
"os": "Android"
}
]
```

`id` should be unique for each resources. `online` describes if resource are available for allocator. Set this `false` if you don't want to allocate resource. `hostname` is used to select suitable resource by running host.

Usage:
```
pytest --allocation_hostname localhost -s --allocation_requirements os=Android my_test
```


## installation

**Requires:** python 3.7<
Expand Down Expand Up @@ -59,5 +66,5 @@ Example:
See [example test](example/test_example.py). Usage:
```
cd example
pytest --allocation_hostname localhost -s --allocation_lock_folder . .
pytest --allocation_hostname localhost -s --allocation_lock_folder . .
```

0 comments on commit 748a367

Please sign in to comment.