Skip to content

Commit

Permalink
Revert "Remove checks"
Browse files Browse the repository at this point in the history
This reverts commit 26328b6.
  • Loading branch information
weiiwang01 committed Jul 30, 2024
1 parent 26328b6 commit ad4f597
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ parts:
- rustc

assumes:
- juju >= 3.4
- juju >= 3.3
11 changes: 11 additions & 0 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,17 @@ def _gen_pebble_plan(self) -> ops.pebble.LayerDict:
},
},
},
checks={
"backend-ready": {
"override": "replace",
"level": "ready",
"period": "30s",
"exec": {
# pylint: disable=line-too-long
"command": 'bash -c "pebble services backend | grep -q inactive || curl -f localhost:6060/readyz"' # noqa: E501
},
}
},
)
return plan

Expand Down
11 changes: 11 additions & 0 deletions tests/unit/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,17 @@ def test_penpot_pebble_layer(harness):
del plan["services"]["backend"]["environment"]["PENPOT_SECRET_KEY"]
del plan["services"]["frontend"]["environment"]["PENPOT_INTERNAL_RESOLVER"]
assert plan == {
"checks": {
"backend-ready": {
"exec": {
# pylint: disable=line-too-long
"command": 'bash -c "pebble services backend | grep -q inactive || curl -f localhost:6060/readyz"' # noqa: E501
},
"level": "ready",
"override": "replace",
"period": "30s",
}
},
"description": "penpot services",
"services": {
"backend": {
Expand Down

0 comments on commit ad4f597

Please sign in to comment.