TDengine/source/dnode/mnode/impl/test/user/user.cpp

33 lines
674 B
C++
Raw Normal View History

2021-12-16 09:05:13 +00:00
/**
2021-12-16 12:16:35 +00:00
* @file user.cpp
2021-12-16 09:05:13 +00:00
* @author slguan (slguan@taosdata.com)
2022-01-04 09:17:25 +00:00
* @brief MNODE module user tests
* @version 1.0
2022-01-04 12:18:09 +00:00
* @date 2022-01-04
2021-12-07 12:14:22 +00:00
*
2022-01-04 12:18:09 +00:00
* @copyright Copyright (c) 2022
2021-12-07 12:14:22 +00:00
*
*/
2022-01-04 12:36:54 +00:00
#include "sut.h"
2021-12-07 12:14:22 +00:00
2022-01-04 12:36:54 +00:00
class MndTestUser : public ::testing::Test {
2021-12-07 12:14:22 +00:00
protected:
static void SetUpTestSuite() { test.Init(TD_TMP_DIR_PATH "mnode_test_user", 9011); }
2021-12-22 10:39:32 +00:00
static void TearDownTestSuite() { test.Cleanup(); }
2021-12-07 12:14:22 +00:00
2021-12-22 10:39:32 +00:00
static Testbase test;
2021-12-07 12:14:22 +00:00
2021-12-13 10:19:09 +00:00
public:
void SetUp() override {}
void TearDown() override {}
};
2022-01-04 12:36:54 +00:00
Testbase MndTestUser::test;
2021-12-13 10:19:09 +00:00
2022-01-04 12:36:54 +00:00
TEST_F(MndTestUser, 01_Show_User) {
2022-06-21 08:18:01 +00:00
uInfo("show users");
2022-04-15 05:31:08 +00:00
test.SendShowReq(TSDB_MGMT_TABLE_USER, "user_users", "");
2021-12-22 10:39:32 +00:00
EXPECT_EQ(test.GetShowRows(), 1);
2021-12-07 12:14:22 +00:00
}