diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-31 16:29:09 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-31 16:29:09 +0800 |
commit | dd9fb807a46db120ef800d7465f50a73a86df288 (patch) | |
tree | 80d3ecab43506e03405c742a84dcc61f474e2212 /tests | |
parent | e938863ae6887f7c3c24145ed3b64dc1d27ee675 (diff) | |
parent | 9acc1c33be76b05231ec3a5a222af02484689974 (diff) | |
download | gitea-dd9fb807a46db120ef800d7465f50a73a86df288.tar.gz gitea-dd9fb807a46db120ef800d7465f50a73a86df288.zip |
Merge pull request #47 from shxsun/master
add start.sh and start.bat and python test init scripts
Diffstat (limited to 'tests')
-rw-r--r-- | tests/.travel.yml | 9 | ||||
-rw-r--r-- | tests/README.md | 11 | ||||
-rw-r--r-- | tests/default_test.go | 17 |
3 files changed, 37 insertions, 0 deletions
diff --git a/tests/.travel.yml b/tests/.travel.yml new file mode 100644 index 0000000000..09a5752bfb --- /dev/null +++ b/tests/.travel.yml @@ -0,0 +1,9 @@ +command: go test -v {} +include: ^.+_test\.go$ +path: ./ +depth: 1 +verbose: true +timeout: 1m +reload: false +html: test.html +notify: [] diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000000..98693257f2 --- /dev/null +++ b/tests/README.md @@ -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 diff --git a/tests/default_test.go b/tests/default_test.go new file mode 100644 index 0000000000..d6f3a03be6 --- /dev/null +++ b/tests/default_test.go @@ -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) + } +} |