зеркало из https://github.com/microsoft/CCF.git
Rename value returned by `/node/version` endpoint (#2584)
This commit is contained in:
Родитель
cb059e2a87
Коммит
020ef9aaee
|
@ -235,12 +235,12 @@
|
|||
},
|
||||
"GetVersion__Out": {
|
||||
"properties": {
|
||||
"version": {
|
||||
"ccf_version": {
|
||||
"$ref": "#/components/schemas/string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"version"
|
||||
"ccf_version"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace ccf
|
|||
|
||||
struct Out
|
||||
{
|
||||
std::string version;
|
||||
std::string ccf_version;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -777,7 +777,7 @@ namespace ccf
|
|||
|
||||
auto version = [this](auto&, nlohmann::json&&) {
|
||||
GetVersion::Out result;
|
||||
result.version = ccf::ccf_version;
|
||||
result.ccf_version = ccf::ccf_version;
|
||||
return make_success(result);
|
||||
};
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace ccf
|
|||
GetState::Out, recovery_target_seqno, last_recovered_seqno)
|
||||
|
||||
DECLARE_JSON_TYPE(GetVersion::Out)
|
||||
DECLARE_JSON_REQUIRED_FIELDS(GetVersion::Out, version)
|
||||
DECLARE_JSON_REQUIRED_FIELDS(GetVersion::Out, ccf_version)
|
||||
|
||||
DECLARE_JSON_TYPE(JoinNetworkNodeToNode::In)
|
||||
DECLARE_JSON_REQUIRED_FIELDS(
|
||||
|
|
|
@ -248,7 +248,7 @@ def test_version(network, args):
|
|||
for node in nodes:
|
||||
with node.client() as c:
|
||||
r = c.get("/node/version")
|
||||
assert r.body.json()["version"] == args.ccf_version
|
||||
assert r.body.json()["ccf_version"] == args.ccf_version
|
||||
|
||||
|
||||
@reqs.description("Replace a node on the same addresses")
|
||||
|
|
Загрузка…
Ссылка в новой задаче