From fdca2ec4bfc1ce0f868a405dbae337533e9fc33a Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Wed, 5 Jan 2022 02:18:47 -0800 Subject: [PATCH] minor changes --- source/dnode/mgmt/impl/test/CMakeLists.txt | 2 - .../mgmt/impl/test/cluster/CMakeLists.txt | 11 ----- .../dnode/mgmt/impl/test/cluster/cluster.cpp | 41 ------------------- .../impl/test/show/CMakeLists.txt | 0 .../{mgmt => mnode}/impl/test/show/show.cpp | 0 5 files changed, 54 deletions(-) delete mode 100644 source/dnode/mgmt/impl/test/cluster/CMakeLists.txt delete mode 100644 source/dnode/mgmt/impl/test/cluster/cluster.cpp rename source/dnode/{mgmt => mnode}/impl/test/show/CMakeLists.txt (100%) rename source/dnode/{mgmt => mnode}/impl/test/show/show.cpp (100%) diff --git a/source/dnode/mgmt/impl/test/CMakeLists.txt b/source/dnode/mgmt/impl/test/CMakeLists.txt index da043f8fe2..b13edf7d5a 100644 --- a/source/dnode/mgmt/impl/test/CMakeLists.txt +++ b/source/dnode/mgmt/impl/test/CMakeLists.txt @@ -6,13 +6,11 @@ add_subdirectory(snode) # add_subdirectory(auth) # add_subdirectory(balance) -add_subdirectory(cluster) add_subdirectory(db) add_subdirectory(dnode) # add_subdirectory(func) add_subdirectory(mnode) add_subdirectory(profile) -add_subdirectory(show) add_subdirectory(stb) # add_subdirectory(sync) # add_subdirectory(telem) diff --git a/source/dnode/mgmt/impl/test/cluster/CMakeLists.txt b/source/dnode/mgmt/impl/test/cluster/CMakeLists.txt deleted file mode 100644 index a63f3106e6..0000000000 --- a/source/dnode/mgmt/impl/test/cluster/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -aux_source_directory(. CLUSTER_SRC) -add_executable(dnode_test_cluster ${CLUSTER_SRC}) -target_link_libraries( - dnode_test_cluster - PUBLIC sut -) - -add_test( - NAME dnode_test_cluster - COMMAND dnode_test_cluster -) diff --git a/source/dnode/mgmt/impl/test/cluster/cluster.cpp b/source/dnode/mgmt/impl/test/cluster/cluster.cpp deleted file mode 100644 index 7d9bff7b23..0000000000 --- a/source/dnode/mgmt/impl/test/cluster/cluster.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @file cluster.cpp - * @author slguan (slguan@taosdata.com) - * @brief DNODE module cluster-msg tests - * @version 0.1 - * @date 2021-12-15 - * - * @copyright Copyright (c) 2021 - * - */ - -#include "sut.h" - -class DndTestCluster : public ::testing::Test { - protected: - static void SetUpTestSuite() { test.Init("/tmp/dnode_test_cluster", 9030); } - static void TearDownTestSuite() { test.Cleanup(); } - - static Testbase test; - - public: - void SetUp() override {} - void TearDown() override {} -}; - -Testbase DndTestCluster::test; - -TEST_F(DndTestCluster, 01_ShowCluster) { - test.SendShowMetaMsg(TSDB_MGMT_TABLE_CLUSTER, ""); - CHECK_META( "show cluster", 3); - CHECK_SCHEMA(0, TSDB_DATA_TYPE_BIGINT, 8, "id"); - CHECK_SCHEMA(1, TSDB_DATA_TYPE_BINARY, TSDB_CLUSTER_ID_LEN + VARSTR_HEADER_SIZE, "name"); - CHECK_SCHEMA(2, TSDB_DATA_TYPE_TIMESTAMP, 8, "create_time"); - - test.SendShowRetrieveMsg(); - EXPECT_EQ(test.GetShowRows(), 1); - - IgnoreInt64(); - IgnoreBinary(TSDB_CLUSTER_ID_LEN); - CheckTimestamp(); -} \ No newline at end of file diff --git a/source/dnode/mgmt/impl/test/show/CMakeLists.txt b/source/dnode/mnode/impl/test/show/CMakeLists.txt similarity index 100% rename from source/dnode/mgmt/impl/test/show/CMakeLists.txt rename to source/dnode/mnode/impl/test/show/CMakeLists.txt diff --git a/source/dnode/mgmt/impl/test/show/show.cpp b/source/dnode/mnode/impl/test/show/show.cpp similarity index 100% rename from source/dnode/mgmt/impl/test/show/show.cpp rename to source/dnode/mnode/impl/test/show/show.cpp -- GitLab