feat: 根据应用版本自动重置构建版本
This commit is contained in:
@@ -144,3 +144,19 @@ def test_update_build_settings(client, tmp_config):
|
||||
resp = client.put("/api/config/build", json={"max_concurrent_builds": 4})
|
||||
assert resp.status_code == 200
|
||||
assert client.get("/api/config/build").json()["max_concurrent_builds"] == 4
|
||||
|
||||
|
||||
# ---- Versions ----
|
||||
|
||||
def test_update_versions_resets_build_number(client, tmp_config):
|
||||
resp = client.put("/api/config/versions", json={"app_ver": "2.196.0"})
|
||||
assert resp.status_code == 200
|
||||
assert resp.json()["app_ver"] == "2.196.0"
|
||||
assert resp.json()["build_ver"] == "2.196.0.0"
|
||||
assert client.get("/api/config/versions").json()["build_ver"] == "2.196.0.0"
|
||||
|
||||
|
||||
def test_update_versions_rejects_invalid_app_version(client, tmp_config):
|
||||
resp = client.put("/api/config/versions", json={"app_ver": "2.196"})
|
||||
assert resp.status_code == 400
|
||||
assert "App_Ver" in resp.json()["detail"]
|
||||
|
||||
Reference in New Issue
Block a user