fix: update env and PR template
This commit is contained in:
@@ -268,6 +268,7 @@ def command(args):
|
||||
|
||||
|
||||
def inspect_state():
|
||||
expected_replicas = int(json.loads(command(COMPOSE + ["config", "--format", "json"]))["services"]["api"]["deploy"]["replicas"])
|
||||
ids = command(COMPOSE + ["ps", "--all", "-q"]).split()
|
||||
rows = []
|
||||
template = (
|
||||
@@ -292,8 +293,8 @@ def inspect_state():
|
||||
)
|
||||
rows.append(row)
|
||||
api = [row for row in rows if row["service"] == "api"]
|
||||
assert len(api) == 2 and all(row["health"] == "healthy" for row in api), (
|
||||
"Two healthy API replicas required"
|
||||
assert len(api) == expected_replicas and all(row["health"] == "healthy" for row in api), (
|
||||
"All configured API replicas must be healthy"
|
||||
)
|
||||
for row in rows:
|
||||
assert row["cpu"] > 0 and row["memory"] > 0
|
||||
@@ -325,7 +326,7 @@ def inspect_state():
|
||||
for row in stats
|
||||
if row["pxname"] == "api_replicas" and row["svname"].startswith("api")
|
||||
]
|
||||
assert len(stats) == 2 and all(row["status"].startswith("UP") for row in stats)
|
||||
assert len(stats) == expected_replicas and all(row["status"].startswith("UP") for row in stats)
|
||||
addresses = {net["address"] for row in api for net in row["networks"].values()}
|
||||
assert all(row["addr"].split(":")[0] in addresses for row in stats)
|
||||
migration = command(
|
||||
|
||||
Reference in New Issue
Block a user