Skip to content

Commit dceeb4a

Browse files
apkardongxinEric
authored andcommitted
Fixing getDocLayerVersion command. (#180)
1 parent 018fd73 commit dceeb4a

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/ExtCmd.actor.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,8 +876,14 @@ struct GetDocLayerVersionCmd {
876876
static Future<Reference<ExtMsgReply>> call(Reference<ExtConnection> ec,
877877
Reference<ExtMsgQuery> query,
878878
Reference<ExtMsgReply> reply) {
879-
reply->addDocument(BSON("package version" << FDB_DOC_VT_VERSION << "source version" << getGitVersion()
880-
<< "flow source version" << getFlowGitVersion()));
879+
// clang-format off
880+
reply->addDocument(BSON(
881+
"ok" << 1 <<
882+
"packageVersion" << FDB_DOC_VT_VERSION <<
883+
"sourceVersion" << getGitVersion() <<
884+
"flowSourceVersion" << getFlowGitVersion()
885+
));
886+
// clang-format on
881887
return reply;
882888
}
883889
};

test/correctness/smoke/test_basic_flow.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,11 @@ def test_connection_status(fixture_db):
7575
assert 'authenticatedUserPrivileges' not in status['authInfo']
7676
assert status['ok'] == 1
7777

78+
79+
def test_doclayer_info(fixture_db):
80+
db = fixture_db
81+
info = db.command("getDocLayerVersion")
82+
assert 'flowSourceVersion' in info
83+
assert 'packageVersion' in info
84+
assert 'sourceVersion' in info
85+

0 commit comments

Comments
 (0)