Skip to content

Commit

Permalink
Merge pull request #15 from jhiemstrawisc/issue-12
Browse files Browse the repository at this point in the history
Issue 12
  • Loading branch information
jhiemstrawisc authored Feb 23, 2024
2 parents df8a684 + c280400 commit 65455d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lotman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,7 @@ int lotman_get_lot_as_json(const char *lot_name, const bool recursive, char **ou
output_obj["owners"] = rp_vec_str.first;
}
else {
output_obj["owners"] = rp_vec_str.first[0]; // Only one owner, this is where it will be.
output_obj["owner"] = rp_vec_str.first[0]; // Only one owner, this is where it will be.
}

// Add parents according to recursive flag
Expand Down
2 changes: 1 addition & 1 deletion test/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ namespace {
ASSERT_TRUE(rv == 0) << err_msg;
json output_JSON = json::parse(output);
free(output);
json expected_output = R"({"children":["lot5"],"lot_name":"lot3","management_policy_attrs":{"creation_time":123.0,"dedicated_GB":10.111,"deletion_time":333.0,"expiration_time":222.0,"max_num_objects":50.0,"opportunistic_GB":6.6},"owners":"not owner1","parents":["lot2","sep_node"],"paths":[{"lot_name":"lot3","path":"/another/path","recursive":true},{"lot_name":"lot3","path":"/updated/path","recursive":false},{"lot_name":"lot3","path":"/foo/barr","recursive":true}],"usage":{"GB_being_written":{"self_contrib":0.0},"dedicated_GB":{"self_contrib":0.0},"num_objects":{"self_contrib":0.0},"objects_being_written":{"self_contrib":0.0},"opportunistic_GB":{"self_contrib":0.0},"total_GB":{"self_contrib":0.0}}})"_json;
json expected_output = R"({"children":["lot5"],"lot_name":"lot3","management_policy_attrs":{"creation_time":123.0,"dedicated_GB":10.111,"deletion_time":333.0,"expiration_time":222.0,"max_num_objects":50.0,"opportunistic_GB":6.6},"owner":"not owner1","parents":["lot2","sep_node"],"paths":[{"lot_name":"lot3","path":"/another/path","recursive":true},{"lot_name":"lot3","path":"/updated/path","recursive":false},{"lot_name":"lot3","path":"/foo/barr","recursive":true}],"usage":{"GB_being_written":{"self_contrib":0.0},"dedicated_GB":{"self_contrib":0.0},"num_objects":{"self_contrib":0.0},"objects_being_written":{"self_contrib":0.0},"opportunistic_GB":{"self_contrib":0.0},"total_GB":{"self_contrib":0.0}}})"_json;
ASSERT_TRUE(output_JSON == expected_output) << output_JSON;

char *output2;
Expand Down

0 comments on commit 65455d8

Please sign in to comment.