Merge pull request #47 from shxsun/master
add start.sh and start.bat and python test init scriptstokarchuk/v1.17
commit
dd9fb807a4
@ -0,0 +1,6 @@ |
||||
#!/bin/bash - |
||||
# |
||||
# start gogs web |
||||
# |
||||
cd "$(dirname $0)" |
||||
./gogs web |
@ -0,0 +1,9 @@ |
||||
command: go test -v {} |
||||
include: ^.+_test\.go$ |
||||
path: ./ |
||||
depth: 1 |
||||
verbose: true |
||||
timeout: 1m |
||||
reload: false |
||||
html: test.html |
||||
notify: [] |
@ -0,0 +1,11 @@ |
||||
## gogs test |
||||
|
||||
this is for developers |
||||
|
||||
## prepare environment |
||||
go get -u github.com/shxsun/travelexec |
||||
# start gogs server |
||||
gogs web |
||||
|
||||
## start test |
||||
travelexec |
@ -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) |
||||
} |
||||
} |
Loading…
Reference in new issue