Skip to content

Commit

Permalink
Fix README.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyandrewmeyer committed Aug 7, 2024
1 parent cc8b3ca commit df5462f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ If you want to, you can override any of these relation or extra-binding associat

```python
state = scenario.State(networks={
scenario.Network("foo", [BindAddress([Address('192.0.2.1')])])
scenario.Network("foo", [scenario.BindAddress([scenario.Address('192.0.2.1')])])
})
```

Expand Down Expand Up @@ -663,7 +663,7 @@ def test_pebble_exec():
ctx.on.pebble_ready(container),
state_in,
)
assert state_out.containers["foo"].get_exec(('ls', '-ll')).stdin = "..."
assert state_out.containers["foo"].get_exec(('ls', '-ll')).stdin == "..."
```

Scenario will attempt to find the right `Exec` object by matching the provided
Expand Down Expand Up @@ -726,9 +726,9 @@ check doesn't have to match the event being generated: by the time that Juju
sends a pebble-check-failed event the check might have started passing again.

```python
ctx = scenario.Context(MyCharm, meta={"name": "foo", "containers": {"my-container": {}}})
ctx = scenario.Context(MyCharm, meta={"name": "foo", "containers": {"my_container": {}}})
check_info = scenario.CheckInfo("http-check", failures=7, status=ops.pebble.CheckStatus.DOWN)
container = scenario.Container("my-container", check_infos={check_info})
container = scenario.Container("my_container", check_infos={check_info})
state = scenario.State(containers={container})
ctx.run(ctx.on.pebble_check_failed(info=check_info, container=container), state=state)
```
Expand Down
2 changes: 1 addition & 1 deletion scenario/consistency_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ def check_containers_consistency(
):
errors.append(
f"the event being processed concerns check {event.check_info.name}, but that "
"check is not the {evt_container_name} container.",
f"check is not the {evt_container_name} container.",
)

# - a container in state.containers is not in meta.containers
Expand Down

0 comments on commit df5462f

Please sign in to comment.