This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
gitea
Watch
3
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
0
Wiki
Activity
Browse Source
add go functest
for-closed-social
skyblue
10 years ago
parent
587e6d8089
commit
9acc1c33be
4 changed files
with
19 additions
and
18 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-2
tests/.travel.yml
+0
-3
tests/README.md
+17
-0
tests/default_test.go
+0
-13
tests/pyquick/test_index_rest.py
+ 2
- 2
tests/.travel.yml
View File
@ -1,5 +1,5 @@
command
:
python -m pytest
{}
include
:
^
test_.*\.py
$
command
:
go test -v
{}
include
:
^
.+_test\.go
$
path
:
./
depth
:
1
verbose
:
true
+ 0
- 3
tests/README.md
View File
@ -3,9 +3,6 @@
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
+ 17
- 0
tests/default_test.go
View File
@ -0,0 +1,17 @@
package
test
import
(
"net/http"
"testing"
)
func
TestMain
(
t
*
testing
.
T
)
{
r
,
err
:=
http
.
Get
(
"http://localhost:3000/"
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
defer
r
.
Body
.
Close
(
)
if
r
.
StatusCode
!=
http
.
StatusOK
{
t
.
Error
(
r
.
StatusCode
)
}
}
+ 0
- 13
tests/pyquick/test_index_rest.py
View File
@ -1,13 +0,0 @@
#!/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
Write
Preview
Loading…
Cancel
Save