Skip to content

Commit

Permalink
✅ Fix MongoService monitoring tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ujibang committed Sep 20, 2023
1 parent d2a8985 commit 6b5fd4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ private static void createURIs() throws URISyntaxException {
});

metricsUri = buildURI("/_metrics");
metricsUnknownCollectionUri = buildURI("/someunknowndb/unknowncollection/_metrics");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public boolean resolve(MongoRequest request, MongoResponse response) {
&& !request.isSchemaStoreMeta()
&& !request.isSchemaStoreSize()
&& !request.isFileBinary()
&& !request.isMetrics()
&& request.isHandledBy("mongo")
&& request.getRepresentationFormat() != null
&& (Resource.isSHAL(request) || Resource.isHAL(request));
Expand Down Expand Up @@ -221,7 +222,7 @@ private BsonDocument readHAL2SHAL(MongoResponse response, BsonValue content) {
addItems(__embedded, embedded, "rh:schema-store");

// add _items if not in error
if (response.getStatusCode() == HttpStatus.SC_OK) {
if (response.getStatusCode() == HttpStatus.SC_OK) {
ret.append("_embedded", __embedded);
}
} else if (response.getStatusCode() == HttpStatus.SC_OK) {
Expand Down

0 comments on commit 6b5fd4c

Please sign in to comment.