diff options
author | Will Buerger <will.buerger@mongodb.com> | 2023-03-31 11:38:33 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-03-31 12:12:23 +0000 |
commit | fa277423533494a91953cd340f3ea7cd74e69efc (patch) | |
tree | 721d0fd0ca4f626c0c0d4465f978d4827215815a /src/mongo/db/pipeline/document_source_out_test.cpp | |
parent | 0551b18ead895bf75d4093c63cb1b167feeafa19 (diff) | |
download | mongo-fa277423533494a91953cd340f3ea7cd74e69efc.tar.gz |
SERVER-75130: Shapify $currentOp, $out, $telemetry, $bucketAuto
Diffstat (limited to 'src/mongo/db/pipeline/document_source_out_test.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_out_test.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/document_source_out_test.cpp b/src/mongo/db/pipeline/document_source_out_test.cpp index d863cf5e032..b31d6964cf4 100644 --- a/src/mongo/db/pipeline/document_source_out_test.cpp +++ b/src/mongo/db/pipeline/document_source_out_test.cpp @@ -115,6 +115,26 @@ TEST_F(DocumentSourceOutTest, SerializeToString) { ASSERT_EQ(reSerialized["$out"]["coll"].getStringData(), "some_collection"); } +TEST_F(DocumentSourceOutTest, Redaction) { + // TODO SERVER-75110 test support for redaction with timeseries options + auto spec = fromjson(R"({ + $out: { + db: "foo", + coll: "bar" + } + })"); + auto docSource = DocumentSourceOut::createFromBson(spec.firstElement(), getExpCtx()); + + ASSERT_BSONOBJ_EQ_AUTO( // NOLINT + R"({ + $out: { + db: "HASH<foo>", + coll: "HASH<bar>" + } + })", + redact(*docSource)); +} + using DocumentSourceOutServerlessTest = ServerlessAggregationContextFixture; TEST_F(DocumentSourceOutServerlessTest, |