Skip to content

Commit

Permalink
Additional http.status_code assertion (#4872)
Browse files Browse the repository at this point in the history
  • Loading branch information
trask authored Dec 13, 2021
1 parent 9896cab commit 6d254b3
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,9 @@ SpanDataAssert assertClientSpan(
if (responseCode != null) {
assertThat(attrs)
.containsEntry(SemanticAttributes.HTTP_STATUS_CODE, (long) responseCode);
} else {
// worth adding AttributesAssert.doesNotContainKey?
assertThat(attrs.get(SemanticAttributes.HTTP_STATUS_CODE)).isNull();
}
});
}
Expand Down

0 comments on commit 6d254b3

Please sign in to comment.