Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a973ad3f
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a973ad3f
编写于
1月 07, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
minor changes
上级
5d86becd
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
33 addition
and
33 deletion
+33
-33
source/dnode/mgmt/impl/test/vnode/CMakeLists.txt
source/dnode/mgmt/impl/test/vnode/CMakeLists.txt
+5
-5
source/dnode/mgmt/impl/test/vnode/vnode.cpp
source/dnode/mgmt/impl/test/vnode/vnode.cpp
+4
-4
source/dnode/mnode/impl/test/db/CMakeLists.txt
source/dnode/mnode/impl/test/db/CMakeLists.txt
+4
-4
source/dnode/mnode/impl/test/db/db.cpp
source/dnode/mnode/impl/test/db/db.cpp
+12
-12
source/dnode/mnode/impl/test/stb/stb.cpp
source/dnode/mnode/impl/test/stb/stb.cpp
+8
-8
未找到文件。
source/dnode/mgmt/impl/test/vnode/CMakeLists.txt
浏览文件 @
a973ad3f
aux_source_directory
(
. V
GROUP
_SRC
)
add_executable
(
dnode_test_v
group
${
VGROUP
_SRC
}
)
aux_source_directory
(
. V
NODE
_SRC
)
add_executable
(
dnode_test_v
node
${
VNODE
_SRC
}
)
target_link_libraries
(
dnode_test_v
group
dnode_test_v
node
PUBLIC sut
)
add_test
(
NAME dnode_test_v
group
COMMAND dnode_test_v
group
NAME dnode_test_v
node
COMMAND dnode_test_v
node
)
source/dnode/mgmt/impl/test/vnode/vnode.cpp
浏览文件 @
a973ad3f
...
...
@@ -11,9 +11,9 @@
#include "sut.h"
class
DndTestV
group
:
public
::
testing
::
Test
{
class
DndTestV
node
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/dnode_test_v
group
"
,
9150
);
}
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/dnode_test_v
node
"
,
9150
);
}
static
void
TearDownTestSuite
()
{
test
.
Cleanup
();
}
static
Testbase
test
;
...
...
@@ -23,9 +23,9 @@ class DndTestVgroup : public ::testing::Test {
void
TearDown
()
override
{}
};
Testbase
DndTestV
group
::
test
;
Testbase
DndTestV
node
::
test
;
TEST_F
(
DndTestV
group
,
01
_Create_Restart_Drop_Vnode
)
{
TEST_F
(
DndTestV
node
,
01
_Create_Restart_Drop_Vnode
)
{
{
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
int32_t
contLen
=
sizeof
(
SCreateVnodeMsg
);
...
...
source/dnode/mnode/impl/test/db/CMakeLists.txt
浏览文件 @
a973ad3f
aux_source_directory
(
. DB_SRC
)
add_executable
(
d
node_test_db
${
DB_SRC
}
)
add_executable
(
m
node_test_db
${
DB_SRC
}
)
target_link_libraries
(
d
node_test_db
m
node_test_db
PUBLIC sut
)
add_test
(
NAME
d
node_test_db
COMMAND
d
node_test_db
NAME
m
node_test_db
COMMAND
m
node_test_db
)
source/dnode/mnode/impl/test/db/db.cpp
浏览文件 @
a973ad3f
/**
* @file db.cpp
* @author slguan (slguan@taosdata.com)
* @brief
DNODE module db-msg
tests
* @version
0.1
* @date 202
1-12-15
* @brief
MNODE module db
tests
* @version
1.0
* @date 202
2-01-11
*
* @copyright Copyright (c) 202
1
* @copyright Copyright (c) 202
2
*
*/
#include "sut.h"
class
D
ndTestDb
:
public
::
testing
::
Test
{
class
M
ndTestDb
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
dnode_test_db"
,
904
0
);
}
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
mnode_test_db"
,
903
0
);
}
static
void
TearDownTestSuite
()
{
test
.
Cleanup
();
}
static
Testbase
test
;
...
...
@@ -23,9 +23,9 @@ class DndTestDb : public ::testing::Test {
void
TearDown
()
override
{}
};
Testbase
D
ndTestDb
::
test
;
Testbase
M
ndTestDb
::
test
;
TEST_F
(
D
ndTestDb
,
01
_ShowDb
)
{
TEST_F
(
M
ndTestDb
,
01
_ShowDb
)
{
test
.
SendShowMetaReq
(
TSDB_MGMT_TABLE_DB
,
""
);
CHECK_META
(
"show databases"
,
18
);
CHECK_SCHEMA
(
0
,
TSDB_DATA_TYPE_BINARY
,
TSDB_DB_NAME_LEN
-
1
+
VARSTR_HEADER_SIZE
,
"name"
);
...
...
@@ -51,7 +51,7 @@ TEST_F(DndTestDb, 01_ShowDb) {
EXPECT_EQ
(
test
.
GetShowRows
(),
0
);
}
TEST_F
(
D
ndTestDb
,
02
_Create_Alter_Drop_Db
)
{
TEST_F
(
M
ndTestDb
,
02
_Create_Alter_Drop_Db
)
{
{
int32_t
contLen
=
sizeof
(
SCreateDbMsg
);
...
...
@@ -211,7 +211,7 @@ TEST_F(DndTestDb, 02_Create_Alter_Drop_Db) {
EXPECT_EQ
(
test
.
GetShowRows
(),
0
);
}
TEST_F
(
D
ndTestDb
,
03
_Create_Use_Restart_Use_Db
)
{
TEST_F
(
M
ndTestDb
,
03
_Create_Use_Restart_Use_Db
)
{
{
int32_t
contLen
=
sizeof
(
SCreateDbMsg
);
...
...
@@ -281,7 +281,7 @@ TEST_F(DndTestDb, 03_Create_Use_Restart_Use_Db) {
EXPECT_EQ
(
pInfo
->
numOfEps
,
1
);
SEpAddrMsg
*
pAddr
=
&
pInfo
->
epAddr
[
0
];
pAddr
->
port
=
htons
(
pAddr
->
port
);
EXPECT_EQ
(
pAddr
->
port
,
90
4
0
);
EXPECT_EQ
(
pAddr
->
port
,
90
3
0
);
EXPECT_STREQ
(
pAddr
->
fqdn
,
"localhost"
);
}
...
...
@@ -297,7 +297,7 @@ TEST_F(DndTestDb, 03_Create_Use_Restart_Use_Db) {
EXPECT_EQ
(
pInfo
->
numOfEps
,
1
);
SEpAddrMsg
*
pAddr
=
&
pInfo
->
epAddr
[
0
];
pAddr
->
port
=
htons
(
pAddr
->
port
);
EXPECT_EQ
(
pAddr
->
port
,
90
4
0
);
EXPECT_EQ
(
pAddr
->
port
,
90
3
0
);
EXPECT_STREQ
(
pAddr
->
fqdn
,
"localhost"
);
}
}
...
...
source/dnode/mnode/impl/test/stb/stb.cpp
浏览文件 @
a973ad3f
/**
* @file stb.cpp
* @author slguan (slguan@taosdata.com)
* @brief
DNODE module db-msg
tests
* @version
0.1
* @date 202
1-12-17
* @brief
MNODE module stb
tests
* @version
1.0
* @date 202
2-01-12
*
* @copyright Copyright (c) 202
1
* @copyright Copyright (c) 202
2
*
*/
#include "sut.h"
class
D
ndTestStb
:
public
::
testing
::
Test
{
class
M
ndTestStb
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
dnode_test_stb"
,
9101
);
}
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/
mnode_test_stb"
,
9034
);
}
static
void
TearDownTestSuite
()
{
test
.
Cleanup
();
}
static
Testbase
test
;
...
...
@@ -23,9 +23,9 @@ class DndTestStb : public ::testing::Test {
void
TearDown
()
override
{}
};
Testbase
D
ndTestStb
::
test
;
Testbase
M
ndTestStb
::
test
;
TEST_F
(
D
ndTestStb
,
01
_Create_Show_Meta_Drop_Restart_Stb
)
{
TEST_F
(
M
ndTestStb
,
01
_Create_Show_Meta_Drop_Restart_Stb
)
{
{
int32_t
contLen
=
sizeof
(
SCreateDbMsg
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录