Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
becc9842
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
becc9842
编写于
1月 25, 2021
作者:
H
huili
提交者:
GitHub
1月 25, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5021 from taosdata/test/testcase
[TD-2840]<test>Add email notification for jenkins
上级
6c3eb4fb
c906dd5c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
185 addition
and
0 deletion
+185
-0
Jenkinsfile
Jenkinsfile
+79
-0
tests/pytest/insert/unsigenedTinyint.py
tests/pytest/insert/unsigenedTinyint.py
+106
-0
未找到文件。
Jenkinsfile
浏览文件 @
becc9842
...
...
@@ -176,5 +176,84 @@ pipeline {
}
}
}
post
{
success
{
emailext
(
subject:
"PR-result: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'"
,
body:
'''<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body leftmargin="8" marginwidth="0" topmargin="8" marginheight="4" offset="0">
<table width="95%" cellpadding="0" cellspacing="0" style="font-size: 16pt; font-family: Tahoma, Arial, Helvetica, sans-serif">
<tr>
<td><br />
<b><font color="#0B610B"><font size="6">构建信息</font></font></b>
<hr size="2" width="100%" align="center" /></td>
</tr>
<tr>
<td>
<ul>
<div style="font-size:18px">
<li>构建名称>>分支:${PROJECT_NAME}</li>
<li>构建结果:<span style="color:green"> Successful </span></li>
<li>构建编号:${BUILD_NUMBER}</li>
<li>触发用户:${CAUSE}</li>
<li>提交信息:${CHANGE_TITLE}</li>
<li>构建地址:<a href=${BUILD_URL}>${BUILD_URL}</a></li>
<li>构建日志:<a href=${BUILD_URL}console>${BUILD_URL}console</a></li>
<li>变更集:${JELLY_SCRIPT}</li>
</div>
</ul>
</td>
</tr>
</table></font>
</body>
</html>'''
,
to:
"${env.CHANGE_AUTHOR_EMAIL}"
,
from:
"support@taosdata.com"
)
}
failure
{
emailext
(
subject:
"PR-result: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'"
,
body:
'''<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body leftmargin="8" marginwidth="0" topmargin="8" marginheight="4" offset="0">
<table width="95%" cellpadding="0" cellspacing="0" style="font-size: 16pt; font-family: Tahoma, Arial, Helvetica, sans-serif">
<tr>
<td><br />
<b><font color="#0B610B"><font size="6">构建信息</font></font></b>
<hr size="2" width="100%" align="center" /></td>
</tr>
<tr>
<td>
<ul>
<div style="font-size:18px">
<li>构建名称>>分支:${PROJECT_NAME}</li>
<li>构建结果:<span style="color:green"> Successful </span></li>
<li>构建编号:${BUILD_NUMBER}</li>
<li>触发用户:${CAUSE}</li>
<li>提交信息:${CHANGE_TITLE}</li>
<li>构建地址:<a href=${BUILD_URL}>${BUILD_URL}</a></li>
<li>构建日志:<a href=${BUILD_URL}console>${BUILD_URL}console</a></li>
<li>变更集:${JELLY_SCRIPT}</li>
</div>
</ul>
</td>
</tr>
</table></font>
</body>
</html>'''
,
to:
"${env.CHANGE_AUTHOR_EMAIL}"
,
from:
"support@taosdata.com"
)
}
}
}
tests/pytest/insert/unsigenedTinyint.py
0 → 100644
浏览文件 @
becc9842
# -*- coding: utf-8 -*-
import
sys
from
util.log
import
*
from
util.cases
import
*
from
util.sql
import
*
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
tdLog
.
info
(
'=============== step1'
)
tdLog
.
info
(
'create table tb (ts timestamp, speed tinyint unsigned)'
)
tdSql
.
execute
(
'create table tb (ts timestamp, speed tinyint unsigned)'
)
tdLog
.
info
(
"insert into tb values (now, NULL)"
)
tdSql
.
execute
(
"insert into tb values (now, NULL)"
)
tdLog
.
info
(
'select * from tb order by ts desc'
)
tdSql
.
query
(
'select * from tb order by ts desc'
)
tdLog
.
info
(
'tdSql.checkRow(1)'
)
tdSql
.
checkRows
(
1
)
tdLog
.
info
(
'tdSql.checkData(0, 1, null)'
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdLog
.
info
(
'=============== step2'
)
tdLog
.
info
(
"insert into tb values (now+1m, -1) -x step2"
)
tdSql
.
error
(
"insert into tb values (now+1m, -1) "
)
tdLog
.
info
(
"insert into tb values (now+1m, NULL)"
)
tdSql
.
execute
(
"insert into tb values (now+1m, NULL)"
)
tdLog
.
info
(
'select * from tb order by ts desc'
)
tdSql
.
query
(
'select * from tb order by ts desc'
)
tdLog
.
info
(
'tdSql.checkRow(2)'
)
tdSql
.
checkRows
(
2
)
tdLog
.
info
(
'tdSql.checkData(0, 1, null)'
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdLog
.
info
(
'=============== step3'
)
tdLog
.
info
(
"insert into tb values (now+2m, 254)"
)
tdSql
.
execute
(
"insert into tb values (now+2m, 254)"
)
tdLog
.
info
(
'select * from tb order by ts desc'
)
tdSql
.
query
(
'select * from tb order by ts desc'
)
tdLog
.
info
(
'tdSql.checkRow(3)'
)
tdSql
.
checkRows
(
3
)
tdLog
.
info
(
'tdSql.checkData(0, 1, 254)'
)
tdSql
.
checkData
(
0
,
1
,
254
)
tdLog
.
info
(
'=============== step4'
)
tdLog
.
info
(
"insert into tb values (now+3m, 255) -x step4"
)
tdSql
.
error
(
"insert into tb values (now+3m, 255)"
)
tdLog
.
info
(
"insert into tb values (now+3m, NULL)"
)
tdSql
.
execute
(
"insert into tb values (now+3m, NULL)"
)
tdLog
.
info
(
'select * from tb'
)
tdSql
.
query
(
'select * from tb'
)
tdLog
.
info
(
'tdSql.checkRow(4)'
)
tdSql
.
checkRows
(
4
)
tdLog
.
info
(
'tdSql.checkData(0, 1, null)'
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdLog
.
info
(
'=============== step5'
)
tdLog
.
info
(
"insert into tb values (now+4m, a2)"
)
tdSql
.
error
(
"insert into tb values (now+4m, a2)"
)
tdLog
.
info
(
"insert into tb values (now+4m, 0)"
)
tdSql
.
execute
(
"insert into tb values (now+4m, 0)"
)
tdLog
.
info
(
'select * from tb order by ts desc'
)
tdSql
.
query
(
'select * from tb order by ts desc'
)
tdLog
.
info
(
'tdSql.checkRow(5)'
)
tdSql
.
checkRows
(
5
)
tdLog
.
info
(
'tdSql.checkData(0, 1, 0)'
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdLog
.
info
(
'=============== step6'
)
tdLog
.
info
(
"insert into tb values (now+5m, 2a)"
)
tdSql
.
error
(
"insert into tb values (now+5m, 2a)"
)
tdLog
.
info
(
"insert into tb values (now+5m, 2)"
)
tdSql
.
execute
(
"insert into tb values (now+5m, 2)"
)
tdLog
.
info
(
'select * from tb order by ts desc'
)
tdSql
.
query
(
'select * from tb order by ts desc'
)
tdLog
.
info
(
'tdSql.checkRow(6)'
)
tdSql
.
checkRows
(
6
)
tdLog
.
info
(
'tdSql.checkData(0, 1, 2)'
)
tdSql
.
checkData
(
0
,
1
,
2
)
tdLog
.
info
(
'=============== step7'
)
tdLog
.
info
(
"insert into tb values (now+6m, 2a'1)"
)
tdSql
.
error
(
"insert into tb values (now+6m, 2a'1)"
)
tdLog
.
info
(
"insert into tb values (now+6m, 2)"
)
tdSql
.
execute
(
"insert into tb values (now+6m, 2)"
)
tdLog
.
info
(
'select * from tb order by ts desc'
)
tdSql
.
query
(
'select * from tb order by ts desc'
)
tdLog
.
info
(
'tdSql.checkRow(7)'
)
tdSql
.
checkRows
(
7
)
tdLog
.
info
(
'tdSql.checkData(0, 1, 2)'
)
tdSql
.
checkData
(
0
,
1
,
2
)
tdLog
.
info
(
'drop database db'
)
tdSql
.
execute
(
'drop database db'
)
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
tdLog
.
info
(
'tdSql.checkRow(0)'
)
tdSql
.
checkRows
(
0
)
# convert end
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录