提交 128554ce 编写于 作者: Z zhaoke

Test for jenkins

上级 1c8f6849
......@@ -15,6 +15,12 @@ pipeline {
env:
- name: MYSQL_PASSWORD
value: 123456
- name: LANG
value: zh_CN.UTF-8
- name: LANGUAGE
value: zh_CN.UTF-8
- name: LC_ALL
value: zh_CN.UTF-8
- name: mysql
image: hub.qucheng.com/app/mysql:5.7.37-debian-10
tty: true
......@@ -41,7 +47,7 @@ pipeline {
steps {
container('playwright') {
// sh "sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories"
sh "apt install -y make git gcc libc-dev curl"
sh "apt install -y make git gcc libc-dev"
sh 'go mod download'
// sh 'go install -a -v github.com/go-bindata/go-bindata/...@latest'
sh 'go-bindata -o=res/res.go -pkg=res res/...'
......@@ -72,8 +78,6 @@ pipeline {
}
container('playwright') {
sh 'curl http://127.0.0.1:8000'
sh 'curl http://127.0.0.1'
sh 'CGO_ENABLED=0 go run test/ui/main.go -runFrom jenkins'
sh 'CGO_ENABLED=0 go run test/cli/main.go -runFrom jenkins'
sh 'CGO_ENABLED=0 go test $(go list ./... | grep -v /test/ui | grep -v /test/cli | grep -v /test/helper)'
......
......@@ -501,6 +501,8 @@ func InitZentaoData(version string, codeDir string) (err error) {
return
}
err = createSuite()
title, err = page.Title()
fmt.Println(title)
if err != nil {
return
}
......
package utils
import (
"fmt"
"log"
"github.com/easysoft/zentaoatf/test/ui/conf"
......@@ -8,6 +9,7 @@ import (
)
func PrintErrOrNot(err error, t provider.T) {
fmt.Println(err)
if err != nil && t != nil {
if conf.ExitAllOnError {
t.Error(err)
......@@ -19,6 +21,7 @@ func PrintErrOrNot(err error, t provider.T) {
}
func PrintErrMsg(err string, t provider.T) {
fmt.Println(err)
if err != "" {
if conf.ExitAllOnError {
log.Panicln(err)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册