diff options
author | lpetrov02 <lpetrov02@yandex-team.com> | 2022-09-29 19:55:29 +0300 |
---|---|---|
committer | lpetrov02 <lpetrov02@yandex-team.com> | 2022-09-29 19:55:29 +0300 |
commit | b971ccb280d2a81b35ad1c647381577fa2896128 (patch) | |
tree | 292bf32a640712e5864e76c8d39d7eccb459b89d | |
parent | 5eca7cdb02ba0f74765749e738248422196df253 (diff) | |
download | ydb-b971ccb280d2a81b35ad1c647381577fa2896128.tar.gz |
Fixes datastreams ListStreams test
Fixes tests. Add test checks on Recurse = true/false/default value
-rw-r--r-- | ydb/services/datastreams/datastreams_ut.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ydb/services/datastreams/datastreams_ut.cpp b/ydb/services/datastreams/datastreams_ut.cpp index b63fc79748..e6dd56cb1f 100644 --- a/ydb/services/datastreams/datastreams_ut.cpp +++ b/ydb/services/datastreams/datastreams_ut.cpp @@ -282,7 +282,7 @@ Y_UNIT_TEST_SUITE(DataStreams) { { - auto result = testServer.DataStreamsClient->ListStreams().ExtractValueSync(); + auto result = testServer.DataStreamsClient->ListStreams(NYdb::NDataStreams::V1::TListStreamsSettings().Recurse(false)).ExtractValueSync(); UNIT_ASSERT_VALUES_EQUAL(result.IsTransportError(), false); UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString()); UNIT_ASSERT_VALUES_EQUAL(result.GetResult().stream_names().size(), 1); @@ -309,13 +309,20 @@ Y_UNIT_TEST_SUITE(DataStreams) { auto result = testServer.DataStreamsClient->ListStreams(NYdb::NDataStreams::V1::TListStreamsSettings().Recurse(true)).ExtractValueSync(); UNIT_ASSERT_VALUES_EQUAL(result.IsTransportError(), false); UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString()); - Cerr << result.GetResult() << "\n"; UNIT_ASSERT_VALUES_EQUAL(result.GetResult().stream_names().size(), 3); UNIT_ASSERT_VALUES_EQUAL(result.GetResult().stream_names(0), streamName); UNIT_ASSERT_VALUES_EQUAL(result.GetResult().stream_names(1), streamName2); UNIT_ASSERT_VALUES_EQUAL(result.GetResult().stream_names(2), streamName3); } + // should behave the same, returning 3 names + { + auto result = testServer.DataStreamsClient->ListStreams().ExtractValueSync(); + UNIT_ASSERT_VALUES_EQUAL(result.IsTransportError(), false); + UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString()); + UNIT_ASSERT_VALUES_EQUAL(result.GetResult().stream_names().size(), 3); + } + // now when stream is created delete should work fine { auto result = testServer.DataStreamsClient->DeleteStream(streamName).ExtractValueSync(); @@ -335,8 +342,6 @@ Y_UNIT_TEST_SUITE(DataStreams) { UNIT_ASSERT_VALUES_EQUAL(result.IsTransportError(), false); UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::SUCCESS); } - - } Y_UNIT_TEST(TestReservedResourcesMetering) { |