mirror of https://github.com/go-gitea/gitea.git
add tests
parent
e938863ae6
commit
74ff217c7e
@ -0,0 +1,9 @@
|
||||
command: python -m pytest {}
|
||||
include: ^test_.*\.py$
|
||||
path: ./
|
||||
depth: 1
|
||||
verbose: true
|
||||
timeout: 1m
|
||||
reload: false
|
||||
html: test.html
|
||||
notify: []
|
@ -0,0 +1,14 @@
|
||||
## gogs test
|
||||
|
||||
this is for developers
|
||||
|
||||
## prepare environment
|
||||
# install python dependency
|
||||
pip install pytest
|
||||
# install basic test tool
|
||||
go get -u github.com/shxsun/travelexec
|
||||
# start gogs server
|
||||
gogs web
|
||||
|
||||
## start test
|
||||
travelexec
|
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env python
|
||||
# coding: utf-8
|
||||
#
|
||||
#
|
||||
|
||||
import requests
|
||||
|
||||
HOST = 'http://localhost:3000'
|
||||
|
||||
def test_index_get():
|
||||
r = requests.get(HOST + '/')
|
||||
assert r.status_code == 200
|
||||
|
Loading…
Reference in New Issue